@archastro/sdk
    Preparing search index...

    Class AgentAgentToolResource

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Create an agent tool Creates a new tool and attaches it to the specified agent. Tools can be either "builtin" (a platform-provided capability identified by builtin_tool_key) or "custom" (a caller-defined tool with its own name, description, parameter schema, and handler). New tools are created in "draft" status by default unless status: "active" is explicitly supplied. Draft tools are not exposed to the LLM during agent runs; call the activate endpoint to promote them. For built-in tools that support multiple instances per agent (those whose catalog entry has a multi_instance_mode), supply name_prefix to namespace the LLM-facing tool names. Requires app scope.

      Parameters

      • agent: string

        Filter results to tools belonging to this agent (agt_...). Omit to return tools across all agents in the app.

      • input: {
            async?: boolean;
            builtin_tool_config?: Record<string, unknown>;
            builtin_tool_key?: string;
            config?: string;
            description?: string;
            handler_type?: string;
            kind: string;
            lookup_key?: string;
            metadata?: Record<string, unknown>;
            name?: string;
            name_prefix?: string;
            parameters?: Record<string, unknown>;
            status?: string;
        }

        Request body.

        • Optionalasync?: boolean

          When true, the tool executes asynchronously and the agent does not block waiting for a result. Applies to "custom" tools.

        • Optionalbuiltin_tool_config?: Record<string, unknown>

          Configuration object for the built-in tool. Shape is defined by the catalog entry's config_schema for the chosen builtin_tool_key. Applies only to "builtin" tools.

        • Optionalbuiltin_tool_key?: string

          Key identifying the built-in tool type to add (e.g. "knowledge_search"). Required when kind is "builtin". Must match a key in the tool catalog.

        • Optionalconfig?: string

          Config ID (cfg_...) referencing the script or workflow graph that implements the tool handler. Applies to "custom" tools.

        • Optionaldescription?: string

          Human-readable description of what the tool does. Shown to the LLM as context. Applies primarily to "custom" tools.

        • Optionalhandler_type?: string

          Execution handler for the tool. One of "script" or "workflow_graph". Applies to "custom" tools.

        • kind: string

          Tool kind. One of "builtin" or "custom".

        • Optionallookup_key?: string

          Optional stable identifier you can use to look up this tool without its ID. Must be unique within the app. Useful for idempotent provisioning.

        • Optionalmetadata?: Record<string, unknown>

          Arbitrary key-value metadata to attach to the tool. Not interpreted by the platform.

        • Optionalname?: string

          Display name for the tool. Required when kind is "custom".

        • Optionalname_prefix?: string

          Per-instance namespace for built-in tools that support multiple instances per agent. Stamped onto LLM-facing tool names (e.g. "org" produces "org_knowledge_search"). Must match ^[a-z][a-z0-9_]*$ and be at most 24 characters. Required for "namespaced" multi-instance tools; omit for single-instance tools.

        • Optionalparameters?: Record<string, unknown>

          JSON Schema object describing the tool's input parameters. Used by the LLM to construct valid tool calls. Applies to "custom" tools.

        • Optionalstatus?: string

          Initial status of the tool. One of "draft" or "active". Defaults to "draft" when omitted.

      Returns Promise<AgentTool>

      The newly created tool.

    • List agent tools Returns all tools for the authenticated app, optionally filtered by agent or tool kind. Both explicitly created tools and tools derived from connected integrations (installation-sourced tools) are included in the response. Installation-sourced tools appear with source: "installation" and status: "active". They are synthesized at request time from connected integrations and do not have a persistent tool ID of the atl_... form; their id is a composite of the installation ID and server tool type. Use the agent filter to retrieve tools for a specific agent. Supplying an agent ID that does not belong to the authenticated app returns 404. Requires app scope.

      Parameters

      • agent: string

        Filter results to tools belonging to this agent (agt_...). Omit to return tools across all agents in the app.

      • Optionalparams: { kind?: string }

        Query parameters.

        • Optionalkind?: string

          Filter by tool kind. One of "builtin" or "custom". Omit to return tools of all kinds.

      Returns Promise<AgentToolListResponse>

      List of tools matching the supplied filters.