archastro.platform.v1.resources.agent_tools
1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. 2# This file is auto-generated by @archastro/sdk-generator. Do not edit. 3# Content hash: 3576c55aa9ad 4 5from __future__ import annotations 6 7import builtins 8from typing import Any, TypedDict 9 10from ...runtime.http_client import HttpClient, SyncHttpClient 11from ...types.common import AgentTool, AgentToolListResponse, BuiltinToolCatalogEntry 12 13AgentToolUpdateInput = TypedDict( 14 "AgentToolUpdateInput", 15 { 16 "async": bool | None, 17 "builtin_tool_config": dict[str, Any] | None, 18 "config": str | None, 19 "description": str | None, 20 "handler_type": str | None, 21 "instruction": str | None, 22 "lookup_key": str | None, 23 "metadata": dict[str, Any] | None, 24 "name": str | None, # Display name for the tool. Applies to `"custom"` tools. 25 "name_prefix": str | None, 26 "parameters": dict[str, Any] | None, 27 "parameters_config": str | None, 28 "template": str | None, 29 }, 30 total=False, 31) 32""" 33Update an agent tool 34 35Attributes: 36 async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools. 37 builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools. 38 config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools. 39 description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools. 40 handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools. 41 instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`. 42 lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app. 43 metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied. 44 name: Display name for the tool. Applies to `"custom"` tools. 45 name_prefix: 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. 46 parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied. 47 parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value. 48 template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults. 49""" 50 51 52class AsyncAgentToolResource: 53 def __init__(self, http: HttpClient): 54 self._http = http 55 56 async def list( 57 self, *, agent: str | None = None, kind: str | None = None 58 ) -> AgentToolListResponse: 59 """ 60 List agent tools 61 Returns all tools for the authenticated app, optionally filtered by agent 62 or tool kind. Both explicitly created tools and tools derived from connected 63 integrations (installation-sourced tools) are included in the response. 64 Installation-sourced tools appear with `source: "installation"` and 65 `status: "active"`. They are synthesized at request time from connected 66 integrations and do not have a persistent tool ID of the `atl_...` form; 67 their `id` is a composite of the installation ID and server tool type. 68 Use the `agent` filter to retrieve tools for a specific agent. Supplying an 69 `agent` ID that does not belong to the authenticated app returns 404. 70 Requires app scope. 71 72 Args: 73 agent: Filter results to tools belonging to this agent (`agt_...`). Omit to return tools across all agents in the app. 74 kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds. 75 76 Returns: 77 List of tools matching the supplied filters. 78 """ 79 query: dict[str, object] = {} 80 if agent is not None: 81 query["agent"] = agent 82 if kind is not None: 83 query["kind"] = kind 84 return await self._http.request( 85 "/api/v1/agent_tools", 86 query=query, 87 response_type=AgentToolListResponse, 88 ) 89 90 async def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]: 91 """ 92 List built-in tool categories 93 Returns the full catalog of built-in tool categories available on the platform. 94 Each entry describes a tool type that can be added to an agent, including its 95 key, display label, configuration schema, and the individual tools it exposes 96 to the LLM. 97 The catalog is global it is not filtered by app or agent. Use the `key` from 98 each entry as the `builtin_tool_key` when creating a built-in tool. Entries 99 whose `requires_integration` is `true` require a connected integration before 100 the tool can be activated on an agent. 101 Requires app scope. 102 103 Returns: 104 Array of built-in tool catalog entries, one per registered tool category. 105 """ 106 return await self._http.request( 107 "/api/v1/agent_tools/catalog", 108 response_type=list[BuiltinToolCatalogEntry], 109 ) 110 111 async def delete(self, tool: str) -> None: 112 """ 113 Delete an agent tool 114 Permanently removes a tool from the agent. This action cannot be undone. 115 Both `"draft"` and `"active"` tools can be deleted. If you only want to 116 stop the agent from using a tool without removing it, use the deactivate 117 endpoint instead. 118 Requires app scope. The authenticated caller must own the tool's parent agent. 119 120 Args: 121 tool: Tool ID (`atl_...`) of the tool to delete. 122 123 Returns: 124 Empty response. Returns HTTP 204 on success. 125 """ 126 await self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE") 127 128 async def get(self, tool: str) -> AgentTool: 129 """ 130 Retrieve an agent tool 131 Returns the tool identified by `tool`. The tool must belong to an agent 132 owned by the authenticated app. 133 Use this endpoint to inspect a tool's current configuration, status, and 134 metadata. To retrieve all tools for an agent or app, use the list endpoint. 135 Requires app scope. 136 137 Args: 138 tool: Tool ID (`atl_...`) of the tool to retrieve. 139 140 Returns: 141 The requested tool. 142 """ 143 return await self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool) 144 145 async def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool: 146 """ 147 Update an agent tool 148 Updates the configuration of an existing tool. All parameters are optional; 149 supply only the fields you want to change. Unspecified fields are left as-is. 150 You can update both `"draft"` and `"active"` tools. Updating an active tool 151 takes effect on the next agent run; any run already in progress continues 152 with the configuration it loaded at start. 153 Supplying `template` re-resolves the referenced AgentToolTemplate and patches 154 the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent 155 association. Any other params you supply alongside `template` override the 156 template defaults. 157 Requires app scope. The authenticated caller must own the tool's parent agent. 158 159 Args: 160 tool: Tool ID (`atl_...`) of the tool to update. 161 input: Request body. 162 input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools. 163 input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools. 164 input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools. 165 input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools. 166 input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools. 167 input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`. 168 input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app. 169 input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied. 170 input.name: Display name for the tool. Applies to `"custom"` tools. 171 input.name_prefix: 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. 172 input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied. 173 input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value. 174 input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults. 175 176 Returns: 177 The updated tool. 178 """ 179 return await self._http.request( 180 f"/api/v1/agent_tools/{tool}", 181 method="PATCH", 182 body=input, 183 response_type=AgentTool, 184 ) 185 186 async def activate(self, tool: str) -> AgentTool: 187 """ 188 Activate an agent tool 189 Transitions a tool from `"draft"` status to `"active"`, making it available 190 for the agent to use during runs. Only tools in `"draft"` status can be 191 activated; calling this on an already-active tool is a no-op that returns the 192 current tool state. 193 Activation validates that all required configuration is present. For built-in 194 tools, this means the `builtin_tool_key` must resolve to a registered tool 195 type and any required integration must be connected. Returns 422 if 196 prerequisite checks fail. 197 Requires app scope. The authenticated caller must own the tool's parent agent. 198 199 Args: 200 tool: Tool ID (`atl_...`) of the tool to activate. 201 202 Returns: 203 The updated tool with `status: "active"`. 204 """ 205 return await self._http.request( 206 f"/api/v1/agent_tools/{tool}/activate", 207 method="POST", 208 response_type=AgentTool, 209 ) 210 211 async def deactivate(self, tool: str) -> AgentTool: 212 """ 213 Deactivate an agent tool 214 Transitions a tool from `"active"` status back to `"draft"`, removing it 215 from the set of tools the agent can use during future runs. Calling this on a 216 tool that is already in `"draft"` status is a no-op that returns the current 217 tool state. 218 Deactivation does not delete the tool or its configuration. To remove the 219 tool permanently, use the delete endpoint. 220 Requires app scope. The authenticated caller must own the tool's parent agent. 221 222 Args: 223 tool: Tool ID (`atl_...`) of the tool to deactivate. 224 225 Returns: 226 The updated tool with `status: "draft"`. 227 """ 228 return await self._http.request( 229 f"/api/v1/agent_tools/{tool}/deactivate", 230 method="POST", 231 response_type=AgentTool, 232 ) 233 234 235class AgentToolResource: 236 def __init__(self, http: SyncHttpClient): 237 self._http = http 238 239 def list(self, *, agent: str | None = None, kind: str | None = None) -> AgentToolListResponse: 240 """ 241 List agent tools 242 Returns all tools for the authenticated app, optionally filtered by agent 243 or tool kind. Both explicitly created tools and tools derived from connected 244 integrations (installation-sourced tools) are included in the response. 245 Installation-sourced tools appear with `source: "installation"` and 246 `status: "active"`. They are synthesized at request time from connected 247 integrations and do not have a persistent tool ID of the `atl_...` form; 248 their `id` is a composite of the installation ID and server tool type. 249 Use the `agent` filter to retrieve tools for a specific agent. Supplying an 250 `agent` ID that does not belong to the authenticated app returns 404. 251 Requires app scope. 252 253 Args: 254 agent: Filter results to tools belonging to this agent (`agt_...`). Omit to return tools across all agents in the app. 255 kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds. 256 257 Returns: 258 List of tools matching the supplied filters. 259 """ 260 query: dict[str, object] = {} 261 if agent is not None: 262 query["agent"] = agent 263 if kind is not None: 264 query["kind"] = kind 265 return self._http.request( 266 "/api/v1/agent_tools", 267 query=query, 268 response_type=AgentToolListResponse, 269 ) 270 271 def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]: 272 """ 273 List built-in tool categories 274 Returns the full catalog of built-in tool categories available on the platform. 275 Each entry describes a tool type that can be added to an agent, including its 276 key, display label, configuration schema, and the individual tools it exposes 277 to the LLM. 278 The catalog is global it is not filtered by app or agent. Use the `key` from 279 each entry as the `builtin_tool_key` when creating a built-in tool. Entries 280 whose `requires_integration` is `true` require a connected integration before 281 the tool can be activated on an agent. 282 Requires app scope. 283 284 Returns: 285 Array of built-in tool catalog entries, one per registered tool category. 286 """ 287 return self._http.request( 288 "/api/v1/agent_tools/catalog", 289 response_type=list[BuiltinToolCatalogEntry], 290 ) 291 292 def delete(self, tool: str) -> None: 293 """ 294 Delete an agent tool 295 Permanently removes a tool from the agent. This action cannot be undone. 296 Both `"draft"` and `"active"` tools can be deleted. If you only want to 297 stop the agent from using a tool without removing it, use the deactivate 298 endpoint instead. 299 Requires app scope. The authenticated caller must own the tool's parent agent. 300 301 Args: 302 tool: Tool ID (`atl_...`) of the tool to delete. 303 304 Returns: 305 Empty response. Returns HTTP 204 on success. 306 """ 307 self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE") 308 309 def get(self, tool: str) -> AgentTool: 310 """ 311 Retrieve an agent tool 312 Returns the tool identified by `tool`. The tool must belong to an agent 313 owned by the authenticated app. 314 Use this endpoint to inspect a tool's current configuration, status, and 315 metadata. To retrieve all tools for an agent or app, use the list endpoint. 316 Requires app scope. 317 318 Args: 319 tool: Tool ID (`atl_...`) of the tool to retrieve. 320 321 Returns: 322 The requested tool. 323 """ 324 return self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool) 325 326 def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool: 327 """ 328 Update an agent tool 329 Updates the configuration of an existing tool. All parameters are optional; 330 supply only the fields you want to change. Unspecified fields are left as-is. 331 You can update both `"draft"` and `"active"` tools. Updating an active tool 332 takes effect on the next agent run; any run already in progress continues 333 with the configuration it loaded at start. 334 Supplying `template` re-resolves the referenced AgentToolTemplate and patches 335 the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent 336 association. Any other params you supply alongside `template` override the 337 template defaults. 338 Requires app scope. The authenticated caller must own the tool's parent agent. 339 340 Args: 341 tool: Tool ID (`atl_...`) of the tool to update. 342 input: Request body. 343 input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools. 344 input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools. 345 input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools. 346 input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools. 347 input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools. 348 input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`. 349 input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app. 350 input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied. 351 input.name: Display name for the tool. Applies to `"custom"` tools. 352 input.name_prefix: 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. 353 input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied. 354 input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value. 355 input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults. 356 357 Returns: 358 The updated tool. 359 """ 360 return self._http.request( 361 f"/api/v1/agent_tools/{tool}", 362 method="PATCH", 363 body=input, 364 response_type=AgentTool, 365 ) 366 367 def activate(self, tool: str) -> AgentTool: 368 """ 369 Activate an agent tool 370 Transitions a tool from `"draft"` status to `"active"`, making it available 371 for the agent to use during runs. Only tools in `"draft"` status can be 372 activated; calling this on an already-active tool is a no-op that returns the 373 current tool state. 374 Activation validates that all required configuration is present. For built-in 375 tools, this means the `builtin_tool_key` must resolve to a registered tool 376 type and any required integration must be connected. Returns 422 if 377 prerequisite checks fail. 378 Requires app scope. The authenticated caller must own the tool's parent agent. 379 380 Args: 381 tool: Tool ID (`atl_...`) of the tool to activate. 382 383 Returns: 384 The updated tool with `status: "active"`. 385 """ 386 return self._http.request( 387 f"/api/v1/agent_tools/{tool}/activate", 388 method="POST", 389 response_type=AgentTool, 390 ) 391 392 def deactivate(self, tool: str) -> AgentTool: 393 """ 394 Deactivate an agent tool 395 Transitions a tool from `"active"` status back to `"draft"`, removing it 396 from the set of tools the agent can use during future runs. Calling this on a 397 tool that is already in `"draft"` status is a no-op that returns the current 398 tool state. 399 Deactivation does not delete the tool or its configuration. To remove the 400 tool permanently, use the delete endpoint. 401 Requires app scope. The authenticated caller must own the tool's parent agent. 402 403 Args: 404 tool: Tool ID (`atl_...`) of the tool to deactivate. 405 406 Returns: 407 The updated tool with `status: "draft"`. 408 """ 409 return self._http.request( 410 f"/api/v1/agent_tools/{tool}/deactivate", 411 method="POST", 412 response_type=AgentTool, 413 )
Update an agent tool
Attributes:
- async: When
true, the tool executes asynchronously and the agent does not block waiting for a result. Applies to"custom"tools. - builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's
config_schemafor the tool'sbuiltin_tool_key. Applies to"builtin"tools. - config: Config ID (
cfg_...) referencing the script or workflow graph that implements the tool handler. Applies to"custom"tools. - description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to
"custom"tools. - handler_type: Execution handler for the tool. One of
"script"or"workflow_graph". Applies to"custom"tools. - instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's
description. - lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
- metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
- name: Display name for the tool. Applies to
"custom"tools. - name_prefix: 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. - parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
- parameters_config: Config ID (
cfg_...) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inlineparametersvalue. - template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its
status,lookup_key,kind, and agent association. Other params you supply alongsidetemplateoverride the template defaults.
53class AsyncAgentToolResource: 54 def __init__(self, http: HttpClient): 55 self._http = http 56 57 async def list( 58 self, *, agent: str | None = None, kind: str | None = None 59 ) -> AgentToolListResponse: 60 """ 61 List agent tools 62 Returns all tools for the authenticated app, optionally filtered by agent 63 or tool kind. Both explicitly created tools and tools derived from connected 64 integrations (installation-sourced tools) are included in the response. 65 Installation-sourced tools appear with `source: "installation"` and 66 `status: "active"`. They are synthesized at request time from connected 67 integrations and do not have a persistent tool ID of the `atl_...` form; 68 their `id` is a composite of the installation ID and server tool type. 69 Use the `agent` filter to retrieve tools for a specific agent. Supplying an 70 `agent` ID that does not belong to the authenticated app returns 404. 71 Requires app scope. 72 73 Args: 74 agent: Filter results to tools belonging to this agent (`agt_...`). Omit to return tools across all agents in the app. 75 kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds. 76 77 Returns: 78 List of tools matching the supplied filters. 79 """ 80 query: dict[str, object] = {} 81 if agent is not None: 82 query["agent"] = agent 83 if kind is not None: 84 query["kind"] = kind 85 return await self._http.request( 86 "/api/v1/agent_tools", 87 query=query, 88 response_type=AgentToolListResponse, 89 ) 90 91 async def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]: 92 """ 93 List built-in tool categories 94 Returns the full catalog of built-in tool categories available on the platform. 95 Each entry describes a tool type that can be added to an agent, including its 96 key, display label, configuration schema, and the individual tools it exposes 97 to the LLM. 98 The catalog is global it is not filtered by app or agent. Use the `key` from 99 each entry as the `builtin_tool_key` when creating a built-in tool. Entries 100 whose `requires_integration` is `true` require a connected integration before 101 the tool can be activated on an agent. 102 Requires app scope. 103 104 Returns: 105 Array of built-in tool catalog entries, one per registered tool category. 106 """ 107 return await self._http.request( 108 "/api/v1/agent_tools/catalog", 109 response_type=list[BuiltinToolCatalogEntry], 110 ) 111 112 async def delete(self, tool: str) -> None: 113 """ 114 Delete an agent tool 115 Permanently removes a tool from the agent. This action cannot be undone. 116 Both `"draft"` and `"active"` tools can be deleted. If you only want to 117 stop the agent from using a tool without removing it, use the deactivate 118 endpoint instead. 119 Requires app scope. The authenticated caller must own the tool's parent agent. 120 121 Args: 122 tool: Tool ID (`atl_...`) of the tool to delete. 123 124 Returns: 125 Empty response. Returns HTTP 204 on success. 126 """ 127 await self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE") 128 129 async def get(self, tool: str) -> AgentTool: 130 """ 131 Retrieve an agent tool 132 Returns the tool identified by `tool`. The tool must belong to an agent 133 owned by the authenticated app. 134 Use this endpoint to inspect a tool's current configuration, status, and 135 metadata. To retrieve all tools for an agent or app, use the list endpoint. 136 Requires app scope. 137 138 Args: 139 tool: Tool ID (`atl_...`) of the tool to retrieve. 140 141 Returns: 142 The requested tool. 143 """ 144 return await self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool) 145 146 async def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool: 147 """ 148 Update an agent tool 149 Updates the configuration of an existing tool. All parameters are optional; 150 supply only the fields you want to change. Unspecified fields are left as-is. 151 You can update both `"draft"` and `"active"` tools. Updating an active tool 152 takes effect on the next agent run; any run already in progress continues 153 with the configuration it loaded at start. 154 Supplying `template` re-resolves the referenced AgentToolTemplate and patches 155 the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent 156 association. Any other params you supply alongside `template` override the 157 template defaults. 158 Requires app scope. The authenticated caller must own the tool's parent agent. 159 160 Args: 161 tool: Tool ID (`atl_...`) of the tool to update. 162 input: Request body. 163 input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools. 164 input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools. 165 input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools. 166 input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools. 167 input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools. 168 input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`. 169 input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app. 170 input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied. 171 input.name: Display name for the tool. Applies to `"custom"` tools. 172 input.name_prefix: 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. 173 input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied. 174 input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value. 175 input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults. 176 177 Returns: 178 The updated tool. 179 """ 180 return await self._http.request( 181 f"/api/v1/agent_tools/{tool}", 182 method="PATCH", 183 body=input, 184 response_type=AgentTool, 185 ) 186 187 async def activate(self, tool: str) -> AgentTool: 188 """ 189 Activate an agent tool 190 Transitions a tool from `"draft"` status to `"active"`, making it available 191 for the agent to use during runs. Only tools in `"draft"` status can be 192 activated; calling this on an already-active tool is a no-op that returns the 193 current tool state. 194 Activation validates that all required configuration is present. For built-in 195 tools, this means the `builtin_tool_key` must resolve to a registered tool 196 type and any required integration must be connected. Returns 422 if 197 prerequisite checks fail. 198 Requires app scope. The authenticated caller must own the tool's parent agent. 199 200 Args: 201 tool: Tool ID (`atl_...`) of the tool to activate. 202 203 Returns: 204 The updated tool with `status: "active"`. 205 """ 206 return await self._http.request( 207 f"/api/v1/agent_tools/{tool}/activate", 208 method="POST", 209 response_type=AgentTool, 210 ) 211 212 async def deactivate(self, tool: str) -> AgentTool: 213 """ 214 Deactivate an agent tool 215 Transitions a tool from `"active"` status back to `"draft"`, removing it 216 from the set of tools the agent can use during future runs. Calling this on a 217 tool that is already in `"draft"` status is a no-op that returns the current 218 tool state. 219 Deactivation does not delete the tool or its configuration. To remove the 220 tool permanently, use the delete endpoint. 221 Requires app scope. The authenticated caller must own the tool's parent agent. 222 223 Args: 224 tool: Tool ID (`atl_...`) of the tool to deactivate. 225 226 Returns: 227 The updated tool with `status: "draft"`. 228 """ 229 return await self._http.request( 230 f"/api/v1/agent_tools/{tool}/deactivate", 231 method="POST", 232 response_type=AgentTool, 233 )
57 async def list( 58 self, *, agent: str | None = None, kind: str | None = None 59 ) -> AgentToolListResponse: 60 """ 61 List agent tools 62 Returns all tools for the authenticated app, optionally filtered by agent 63 or tool kind. Both explicitly created tools and tools derived from connected 64 integrations (installation-sourced tools) are included in the response. 65 Installation-sourced tools appear with `source: "installation"` and 66 `status: "active"`. They are synthesized at request time from connected 67 integrations and do not have a persistent tool ID of the `atl_...` form; 68 their `id` is a composite of the installation ID and server tool type. 69 Use the `agent` filter to retrieve tools for a specific agent. Supplying an 70 `agent` ID that does not belong to the authenticated app returns 404. 71 Requires app scope. 72 73 Args: 74 agent: Filter results to tools belonging to this agent (`agt_...`). Omit to return tools across all agents in the app. 75 kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds. 76 77 Returns: 78 List of tools matching the supplied filters. 79 """ 80 query: dict[str, object] = {} 81 if agent is not None: 82 query["agent"] = agent 83 if kind is not None: 84 query["kind"] = kind 85 return await self._http.request( 86 "/api/v1/agent_tools", 87 query=query, 88 response_type=AgentToolListResponse, 89 )
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.
Arguments:
- agent: Filter results to tools belonging to this agent (
agt_...). Omit to return tools across all agents in the app. - kind: Filter by tool kind. One of
"builtin"or"custom". Omit to return tools of all kinds.
Returns:
List of tools matching the supplied filters.
91 async def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]: 92 """ 93 List built-in tool categories 94 Returns the full catalog of built-in tool categories available on the platform. 95 Each entry describes a tool type that can be added to an agent, including its 96 key, display label, configuration schema, and the individual tools it exposes 97 to the LLM. 98 The catalog is global it is not filtered by app or agent. Use the `key` from 99 each entry as the `builtin_tool_key` when creating a built-in tool. Entries 100 whose `requires_integration` is `true` require a connected integration before 101 the tool can be activated on an agent. 102 Requires app scope. 103 104 Returns: 105 Array of built-in tool catalog entries, one per registered tool category. 106 """ 107 return await self._http.request( 108 "/api/v1/agent_tools/catalog", 109 response_type=list[BuiltinToolCatalogEntry], 110 )
List built-in tool categories
Returns the full catalog of built-in tool categories available on the platform.
Each entry describes a tool type that can be added to an agent, including its
key, display label, configuration schema, and the individual tools it exposes
to the LLM.
The catalog is global it is not filtered by app or agent. Use the key from
each entry as the builtin_tool_key when creating a built-in tool. Entries
whose requires_integration is true require a connected integration before
the tool can be activated on an agent.
Requires app scope.
Returns:
Array of built-in tool catalog entries, one per registered tool category.
112 async def delete(self, tool: str) -> None: 113 """ 114 Delete an agent tool 115 Permanently removes a tool from the agent. This action cannot be undone. 116 Both `"draft"` and `"active"` tools can be deleted. If you only want to 117 stop the agent from using a tool without removing it, use the deactivate 118 endpoint instead. 119 Requires app scope. The authenticated caller must own the tool's parent agent. 120 121 Args: 122 tool: Tool ID (`atl_...`) of the tool to delete. 123 124 Returns: 125 Empty response. Returns HTTP 204 on success. 126 """ 127 await self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE")
Delete an agent tool
Permanently removes a tool from the agent. This action cannot be undone.
Both "draft" and "active" tools can be deleted. If you only want to
stop the agent from using a tool without removing it, use the deactivate
endpoint instead.
Requires app scope. The authenticated caller must own the tool's parent agent.
Arguments:
- tool: Tool ID (
atl_...) of the tool to delete.
Returns:
Empty response. Returns HTTP 204 on success.
129 async def get(self, tool: str) -> AgentTool: 130 """ 131 Retrieve an agent tool 132 Returns the tool identified by `tool`. The tool must belong to an agent 133 owned by the authenticated app. 134 Use this endpoint to inspect a tool's current configuration, status, and 135 metadata. To retrieve all tools for an agent or app, use the list endpoint. 136 Requires app scope. 137 138 Args: 139 tool: Tool ID (`atl_...`) of the tool to retrieve. 140 141 Returns: 142 The requested tool. 143 """ 144 return await self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool)
Retrieve an agent tool
Returns the tool identified by tool. The tool must belong to an agent
owned by the authenticated app.
Use this endpoint to inspect a tool's current configuration, status, and
metadata. To retrieve all tools for an agent or app, use the list endpoint.
Requires app scope.
Arguments:
- tool: Tool ID (
atl_...) of the tool to retrieve.
Returns:
The requested tool.
146 async def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool: 147 """ 148 Update an agent tool 149 Updates the configuration of an existing tool. All parameters are optional; 150 supply only the fields you want to change. Unspecified fields are left as-is. 151 You can update both `"draft"` and `"active"` tools. Updating an active tool 152 takes effect on the next agent run; any run already in progress continues 153 with the configuration it loaded at start. 154 Supplying `template` re-resolves the referenced AgentToolTemplate and patches 155 the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent 156 association. Any other params you supply alongside `template` override the 157 template defaults. 158 Requires app scope. The authenticated caller must own the tool's parent agent. 159 160 Args: 161 tool: Tool ID (`atl_...`) of the tool to update. 162 input: Request body. 163 input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools. 164 input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools. 165 input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools. 166 input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools. 167 input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools. 168 input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`. 169 input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app. 170 input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied. 171 input.name: Display name for the tool. Applies to `"custom"` tools. 172 input.name_prefix: 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. 173 input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied. 174 input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value. 175 input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults. 176 177 Returns: 178 The updated tool. 179 """ 180 return await self._http.request( 181 f"/api/v1/agent_tools/{tool}", 182 method="PATCH", 183 body=input, 184 response_type=AgentTool, 185 )
Update an agent tool
Updates the configuration of an existing tool. All parameters are optional;
supply only the fields you want to change. Unspecified fields are left as-is.
You can update both "draft" and "active" tools. Updating an active tool
takes effect on the next agent run; any run already in progress continues
with the configuration it loaded at start.
Supplying template re-resolves the referenced AgentToolTemplate and patches
the tool in place, preserving its status, lookup_key, kind, and agent
association. Any other params you supply alongside template override the
template defaults.
Requires app scope. The authenticated caller must own the tool's parent agent.
Arguments:
- tool: Tool ID (
atl_...) of the tool to update. - input: Request body.
- input.async: When
true, the tool executes asynchronously and the agent does not block waiting for a result. Applies to"custom"tools. - input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's
config_schemafor the tool'sbuiltin_tool_key. Applies to"builtin"tools. - input.config: Config ID (
cfg_...) referencing the script or workflow graph that implements the tool handler. Applies to"custom"tools. - input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to
"custom"tools. - input.handler_type: Execution handler for the tool. One of
"script"or"workflow_graph". Applies to"custom"tools. - input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's
description. - input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
- input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
- input.name: Display name for the tool. Applies to
"custom"tools. - input.name_prefix: 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. - input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
- input.parameters_config: Config ID (
cfg_...) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inlineparametersvalue. - input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its
status,lookup_key,kind, and agent association. Other params you supply alongsidetemplateoverride the template defaults.
Returns:
The updated tool.
187 async def activate(self, tool: str) -> AgentTool: 188 """ 189 Activate an agent tool 190 Transitions a tool from `"draft"` status to `"active"`, making it available 191 for the agent to use during runs. Only tools in `"draft"` status can be 192 activated; calling this on an already-active tool is a no-op that returns the 193 current tool state. 194 Activation validates that all required configuration is present. For built-in 195 tools, this means the `builtin_tool_key` must resolve to a registered tool 196 type and any required integration must be connected. Returns 422 if 197 prerequisite checks fail. 198 Requires app scope. The authenticated caller must own the tool's parent agent. 199 200 Args: 201 tool: Tool ID (`atl_...`) of the tool to activate. 202 203 Returns: 204 The updated tool with `status: "active"`. 205 """ 206 return await self._http.request( 207 f"/api/v1/agent_tools/{tool}/activate", 208 method="POST", 209 response_type=AgentTool, 210 )
Activate an agent tool
Transitions a tool from "draft" status to "active", making it available
for the agent to use during runs. Only tools in "draft" status can be
activated; calling this on an already-active tool is a no-op that returns the
current tool state.
Activation validates that all required configuration is present. For built-in
tools, this means the builtin_tool_key must resolve to a registered tool
type and any required integration must be connected. Returns 422 if
prerequisite checks fail.
Requires app scope. The authenticated caller must own the tool's parent agent.
Arguments:
- tool: Tool ID (
atl_...) of the tool to activate.
Returns:
The updated tool with
status: "active".
212 async def deactivate(self, tool: str) -> AgentTool: 213 """ 214 Deactivate an agent tool 215 Transitions a tool from `"active"` status back to `"draft"`, removing it 216 from the set of tools the agent can use during future runs. Calling this on a 217 tool that is already in `"draft"` status is a no-op that returns the current 218 tool state. 219 Deactivation does not delete the tool or its configuration. To remove the 220 tool permanently, use the delete endpoint. 221 Requires app scope. The authenticated caller must own the tool's parent agent. 222 223 Args: 224 tool: Tool ID (`atl_...`) of the tool to deactivate. 225 226 Returns: 227 The updated tool with `status: "draft"`. 228 """ 229 return await self._http.request( 230 f"/api/v1/agent_tools/{tool}/deactivate", 231 method="POST", 232 response_type=AgentTool, 233 )
Deactivate an agent tool
Transitions a tool from "active" status back to "draft", removing it
from the set of tools the agent can use during future runs. Calling this on a
tool that is already in "draft" status is a no-op that returns the current
tool state.
Deactivation does not delete the tool or its configuration. To remove the
tool permanently, use the delete endpoint.
Requires app scope. The authenticated caller must own the tool's parent agent.
Arguments:
- tool: Tool ID (
atl_...) of the tool to deactivate.
Returns:
The updated tool with
status: "draft".
236class AgentToolResource: 237 def __init__(self, http: SyncHttpClient): 238 self._http = http 239 240 def list(self, *, agent: str | None = None, kind: str | None = None) -> AgentToolListResponse: 241 """ 242 List agent tools 243 Returns all tools for the authenticated app, optionally filtered by agent 244 or tool kind. Both explicitly created tools and tools derived from connected 245 integrations (installation-sourced tools) are included in the response. 246 Installation-sourced tools appear with `source: "installation"` and 247 `status: "active"`. They are synthesized at request time from connected 248 integrations and do not have a persistent tool ID of the `atl_...` form; 249 their `id` is a composite of the installation ID and server tool type. 250 Use the `agent` filter to retrieve tools for a specific agent. Supplying an 251 `agent` ID that does not belong to the authenticated app returns 404. 252 Requires app scope. 253 254 Args: 255 agent: Filter results to tools belonging to this agent (`agt_...`). Omit to return tools across all agents in the app. 256 kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds. 257 258 Returns: 259 List of tools matching the supplied filters. 260 """ 261 query: dict[str, object] = {} 262 if agent is not None: 263 query["agent"] = agent 264 if kind is not None: 265 query["kind"] = kind 266 return self._http.request( 267 "/api/v1/agent_tools", 268 query=query, 269 response_type=AgentToolListResponse, 270 ) 271 272 def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]: 273 """ 274 List built-in tool categories 275 Returns the full catalog of built-in tool categories available on the platform. 276 Each entry describes a tool type that can be added to an agent, including its 277 key, display label, configuration schema, and the individual tools it exposes 278 to the LLM. 279 The catalog is global it is not filtered by app or agent. Use the `key` from 280 each entry as the `builtin_tool_key` when creating a built-in tool. Entries 281 whose `requires_integration` is `true` require a connected integration before 282 the tool can be activated on an agent. 283 Requires app scope. 284 285 Returns: 286 Array of built-in tool catalog entries, one per registered tool category. 287 """ 288 return self._http.request( 289 "/api/v1/agent_tools/catalog", 290 response_type=list[BuiltinToolCatalogEntry], 291 ) 292 293 def delete(self, tool: str) -> None: 294 """ 295 Delete an agent tool 296 Permanently removes a tool from the agent. This action cannot be undone. 297 Both `"draft"` and `"active"` tools can be deleted. If you only want to 298 stop the agent from using a tool without removing it, use the deactivate 299 endpoint instead. 300 Requires app scope. The authenticated caller must own the tool's parent agent. 301 302 Args: 303 tool: Tool ID (`atl_...`) of the tool to delete. 304 305 Returns: 306 Empty response. Returns HTTP 204 on success. 307 """ 308 self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE") 309 310 def get(self, tool: str) -> AgentTool: 311 """ 312 Retrieve an agent tool 313 Returns the tool identified by `tool`. The tool must belong to an agent 314 owned by the authenticated app. 315 Use this endpoint to inspect a tool's current configuration, status, and 316 metadata. To retrieve all tools for an agent or app, use the list endpoint. 317 Requires app scope. 318 319 Args: 320 tool: Tool ID (`atl_...`) of the tool to retrieve. 321 322 Returns: 323 The requested tool. 324 """ 325 return self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool) 326 327 def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool: 328 """ 329 Update an agent tool 330 Updates the configuration of an existing tool. All parameters are optional; 331 supply only the fields you want to change. Unspecified fields are left as-is. 332 You can update both `"draft"` and `"active"` tools. Updating an active tool 333 takes effect on the next agent run; any run already in progress continues 334 with the configuration it loaded at start. 335 Supplying `template` re-resolves the referenced AgentToolTemplate and patches 336 the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent 337 association. Any other params you supply alongside `template` override the 338 template defaults. 339 Requires app scope. The authenticated caller must own the tool's parent agent. 340 341 Args: 342 tool: Tool ID (`atl_...`) of the tool to update. 343 input: Request body. 344 input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools. 345 input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools. 346 input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools. 347 input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools. 348 input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools. 349 input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`. 350 input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app. 351 input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied. 352 input.name: Display name for the tool. Applies to `"custom"` tools. 353 input.name_prefix: 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. 354 input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied. 355 input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value. 356 input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults. 357 358 Returns: 359 The updated tool. 360 """ 361 return self._http.request( 362 f"/api/v1/agent_tools/{tool}", 363 method="PATCH", 364 body=input, 365 response_type=AgentTool, 366 ) 367 368 def activate(self, tool: str) -> AgentTool: 369 """ 370 Activate an agent tool 371 Transitions a tool from `"draft"` status to `"active"`, making it available 372 for the agent to use during runs. Only tools in `"draft"` status can be 373 activated; calling this on an already-active tool is a no-op that returns the 374 current tool state. 375 Activation validates that all required configuration is present. For built-in 376 tools, this means the `builtin_tool_key` must resolve to a registered tool 377 type and any required integration must be connected. Returns 422 if 378 prerequisite checks fail. 379 Requires app scope. The authenticated caller must own the tool's parent agent. 380 381 Args: 382 tool: Tool ID (`atl_...`) of the tool to activate. 383 384 Returns: 385 The updated tool with `status: "active"`. 386 """ 387 return self._http.request( 388 f"/api/v1/agent_tools/{tool}/activate", 389 method="POST", 390 response_type=AgentTool, 391 ) 392 393 def deactivate(self, tool: str) -> AgentTool: 394 """ 395 Deactivate an agent tool 396 Transitions a tool from `"active"` status back to `"draft"`, removing it 397 from the set of tools the agent can use during future runs. Calling this on a 398 tool that is already in `"draft"` status is a no-op that returns the current 399 tool state. 400 Deactivation does not delete the tool or its configuration. To remove the 401 tool permanently, use the delete endpoint. 402 Requires app scope. The authenticated caller must own the tool's parent agent. 403 404 Args: 405 tool: Tool ID (`atl_...`) of the tool to deactivate. 406 407 Returns: 408 The updated tool with `status: "draft"`. 409 """ 410 return self._http.request( 411 f"/api/v1/agent_tools/{tool}/deactivate", 412 method="POST", 413 response_type=AgentTool, 414 )
240 def list(self, *, agent: str | None = None, kind: str | None = None) -> AgentToolListResponse: 241 """ 242 List agent tools 243 Returns all tools for the authenticated app, optionally filtered by agent 244 or tool kind. Both explicitly created tools and tools derived from connected 245 integrations (installation-sourced tools) are included in the response. 246 Installation-sourced tools appear with `source: "installation"` and 247 `status: "active"`. They are synthesized at request time from connected 248 integrations and do not have a persistent tool ID of the `atl_...` form; 249 their `id` is a composite of the installation ID and server tool type. 250 Use the `agent` filter to retrieve tools for a specific agent. Supplying an 251 `agent` ID that does not belong to the authenticated app returns 404. 252 Requires app scope. 253 254 Args: 255 agent: Filter results to tools belonging to this agent (`agt_...`). Omit to return tools across all agents in the app. 256 kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds. 257 258 Returns: 259 List of tools matching the supplied filters. 260 """ 261 query: dict[str, object] = {} 262 if agent is not None: 263 query["agent"] = agent 264 if kind is not None: 265 query["kind"] = kind 266 return self._http.request( 267 "/api/v1/agent_tools", 268 query=query, 269 response_type=AgentToolListResponse, 270 )
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.
Arguments:
- agent: Filter results to tools belonging to this agent (
agt_...). Omit to return tools across all agents in the app. - kind: Filter by tool kind. One of
"builtin"or"custom". Omit to return tools of all kinds.
Returns:
List of tools matching the supplied filters.
272 def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]: 273 """ 274 List built-in tool categories 275 Returns the full catalog of built-in tool categories available on the platform. 276 Each entry describes a tool type that can be added to an agent, including its 277 key, display label, configuration schema, and the individual tools it exposes 278 to the LLM. 279 The catalog is global it is not filtered by app or agent. Use the `key` from 280 each entry as the `builtin_tool_key` when creating a built-in tool. Entries 281 whose `requires_integration` is `true` require a connected integration before 282 the tool can be activated on an agent. 283 Requires app scope. 284 285 Returns: 286 Array of built-in tool catalog entries, one per registered tool category. 287 """ 288 return self._http.request( 289 "/api/v1/agent_tools/catalog", 290 response_type=list[BuiltinToolCatalogEntry], 291 )
List built-in tool categories
Returns the full catalog of built-in tool categories available on the platform.
Each entry describes a tool type that can be added to an agent, including its
key, display label, configuration schema, and the individual tools it exposes
to the LLM.
The catalog is global it is not filtered by app or agent. Use the key from
each entry as the builtin_tool_key when creating a built-in tool. Entries
whose requires_integration is true require a connected integration before
the tool can be activated on an agent.
Requires app scope.
Returns:
Array of built-in tool catalog entries, one per registered tool category.
293 def delete(self, tool: str) -> None: 294 """ 295 Delete an agent tool 296 Permanently removes a tool from the agent. This action cannot be undone. 297 Both `"draft"` and `"active"` tools can be deleted. If you only want to 298 stop the agent from using a tool without removing it, use the deactivate 299 endpoint instead. 300 Requires app scope. The authenticated caller must own the tool's parent agent. 301 302 Args: 303 tool: Tool ID (`atl_...`) of the tool to delete. 304 305 Returns: 306 Empty response. Returns HTTP 204 on success. 307 """ 308 self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE")
Delete an agent tool
Permanently removes a tool from the agent. This action cannot be undone.
Both "draft" and "active" tools can be deleted. If you only want to
stop the agent from using a tool without removing it, use the deactivate
endpoint instead.
Requires app scope. The authenticated caller must own the tool's parent agent.
Arguments:
- tool: Tool ID (
atl_...) of the tool to delete.
Returns:
Empty response. Returns HTTP 204 on success.
310 def get(self, tool: str) -> AgentTool: 311 """ 312 Retrieve an agent tool 313 Returns the tool identified by `tool`. The tool must belong to an agent 314 owned by the authenticated app. 315 Use this endpoint to inspect a tool's current configuration, status, and 316 metadata. To retrieve all tools for an agent or app, use the list endpoint. 317 Requires app scope. 318 319 Args: 320 tool: Tool ID (`atl_...`) of the tool to retrieve. 321 322 Returns: 323 The requested tool. 324 """ 325 return self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool)
Retrieve an agent tool
Returns the tool identified by tool. The tool must belong to an agent
owned by the authenticated app.
Use this endpoint to inspect a tool's current configuration, status, and
metadata. To retrieve all tools for an agent or app, use the list endpoint.
Requires app scope.
Arguments:
- tool: Tool ID (
atl_...) of the tool to retrieve.
Returns:
The requested tool.
327 def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool: 328 """ 329 Update an agent tool 330 Updates the configuration of an existing tool. All parameters are optional; 331 supply only the fields you want to change. Unspecified fields are left as-is. 332 You can update both `"draft"` and `"active"` tools. Updating an active tool 333 takes effect on the next agent run; any run already in progress continues 334 with the configuration it loaded at start. 335 Supplying `template` re-resolves the referenced AgentToolTemplate and patches 336 the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent 337 association. Any other params you supply alongside `template` override the 338 template defaults. 339 Requires app scope. The authenticated caller must own the tool's parent agent. 340 341 Args: 342 tool: Tool ID (`atl_...`) of the tool to update. 343 input: Request body. 344 input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools. 345 input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools. 346 input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools. 347 input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools. 348 input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools. 349 input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`. 350 input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app. 351 input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied. 352 input.name: Display name for the tool. Applies to `"custom"` tools. 353 input.name_prefix: 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. 354 input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied. 355 input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value. 356 input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults. 357 358 Returns: 359 The updated tool. 360 """ 361 return self._http.request( 362 f"/api/v1/agent_tools/{tool}", 363 method="PATCH", 364 body=input, 365 response_type=AgentTool, 366 )
Update an agent tool
Updates the configuration of an existing tool. All parameters are optional;
supply only the fields you want to change. Unspecified fields are left as-is.
You can update both "draft" and "active" tools. Updating an active tool
takes effect on the next agent run; any run already in progress continues
with the configuration it loaded at start.
Supplying template re-resolves the referenced AgentToolTemplate and patches
the tool in place, preserving its status, lookup_key, kind, and agent
association. Any other params you supply alongside template override the
template defaults.
Requires app scope. The authenticated caller must own the tool's parent agent.
Arguments:
- tool: Tool ID (
atl_...) of the tool to update. - input: Request body.
- input.async: When
true, the tool executes asynchronously and the agent does not block waiting for a result. Applies to"custom"tools. - input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's
config_schemafor the tool'sbuiltin_tool_key. Applies to"builtin"tools. - input.config: Config ID (
cfg_...) referencing the script or workflow graph that implements the tool handler. Applies to"custom"tools. - input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to
"custom"tools. - input.handler_type: Execution handler for the tool. One of
"script"or"workflow_graph". Applies to"custom"tools. - input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's
description. - input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
- input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
- input.name: Display name for the tool. Applies to
"custom"tools. - input.name_prefix: 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. - input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
- input.parameters_config: Config ID (
cfg_...) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inlineparametersvalue. - input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its
status,lookup_key,kind, and agent association. Other params you supply alongsidetemplateoverride the template defaults.
Returns:
The updated tool.
368 def activate(self, tool: str) -> AgentTool: 369 """ 370 Activate an agent tool 371 Transitions a tool from `"draft"` status to `"active"`, making it available 372 for the agent to use during runs. Only tools in `"draft"` status can be 373 activated; calling this on an already-active tool is a no-op that returns the 374 current tool state. 375 Activation validates that all required configuration is present. For built-in 376 tools, this means the `builtin_tool_key` must resolve to a registered tool 377 type and any required integration must be connected. Returns 422 if 378 prerequisite checks fail. 379 Requires app scope. The authenticated caller must own the tool's parent agent. 380 381 Args: 382 tool: Tool ID (`atl_...`) of the tool to activate. 383 384 Returns: 385 The updated tool with `status: "active"`. 386 """ 387 return self._http.request( 388 f"/api/v1/agent_tools/{tool}/activate", 389 method="POST", 390 response_type=AgentTool, 391 )
Activate an agent tool
Transitions a tool from "draft" status to "active", making it available
for the agent to use during runs. Only tools in "draft" status can be
activated; calling this on an already-active tool is a no-op that returns the
current tool state.
Activation validates that all required configuration is present. For built-in
tools, this means the builtin_tool_key must resolve to a registered tool
type and any required integration must be connected. Returns 422 if
prerequisite checks fail.
Requires app scope. The authenticated caller must own the tool's parent agent.
Arguments:
- tool: Tool ID (
atl_...) of the tool to activate.
Returns:
The updated tool with
status: "active".
393 def deactivate(self, tool: str) -> AgentTool: 394 """ 395 Deactivate an agent tool 396 Transitions a tool from `"active"` status back to `"draft"`, removing it 397 from the set of tools the agent can use during future runs. Calling this on a 398 tool that is already in `"draft"` status is a no-op that returns the current 399 tool state. 400 Deactivation does not delete the tool or its configuration. To remove the 401 tool permanently, use the delete endpoint. 402 Requires app scope. The authenticated caller must own the tool's parent agent. 403 404 Args: 405 tool: Tool ID (`atl_...`) of the tool to deactivate. 406 407 Returns: 408 The updated tool with `status: "draft"`. 409 """ 410 return self._http.request( 411 f"/api/v1/agent_tools/{tool}/deactivate", 412 method="POST", 413 response_type=AgentTool, 414 )
Deactivate an agent tool
Transitions a tool from "active" status back to "draft", removing it
from the set of tools the agent can use during future runs. Calling this on a
tool that is already in "draft" status is a no-op that returns the current
tool state.
Deactivation does not delete the tool or its configuration. To remove the
tool permanently, use the delete endpoint.
Requires app scope. The authenticated caller must own the tool's parent agent.
Arguments:
- tool: Tool ID (
atl_...) of the tool to deactivate.
Returns:
The updated tool with
status: "draft".