Tools Guide
Extend agents with native catalog entries, custom uploads, and BOSA connectors. Use this guide when you need to attach bespoke logic, integrate vendor connectors, or govern tool reuploads across environments via REST, the Python SDK, or the CLI.
Create Tools
from glaip_sdk import Client
client = Client()
# Upload a custom Python tool from disk
tool = client.create_tool(
name="calculator",
file_path="./calculator.py",
description="Performs basic arithmetic",
tags=["math", "demo"],
)
print(tool.id)# Upload a custom Python tool from disk
aip tools create \
--file calculator.py \
--name calculator \
--description "Performs basic arithmetic"
# List tools and capture the ID
aip tools listTool Source Expectations
Python tools must export a
tool_plugindecorated function or class.Dependencies are packaged inside the upload (zip or single file).
Runtime stdout/stderr is captured and forwarded in the agent event stream.
The full calculator.py example above mirrors the structure used in python/glaip-sdk/hello_tool.py and the SDK examples. Update the _run implementation to call your own business logic instead of eval before uploading.
Manage Tools
Update or Re-upload
CLI re-uploads replace the code package; adjust metadata by editing an export and re-importing or by using the SDK/REST helpers.
Delete
Common errors and fixes
422 Unprocessable Entity on upload
Missing tool_plugin decorator or invalid metadata fields.
Validate the module exports tool_plugin and double-check required metadata (name, version, description).
CLI upload hangs after progress bar
Large dependency bundle or slow network upload.
Zip the tool directory, remove unused assets, or upload via the REST API with a resumable client.
Agent cannot run the tool at runtime
Tool not attached, or config missing required keys.
Re-run aip agents update --tools and verify tool_configs in the agent payload.
401 Unauthorized when calling /tools endpoints
API key scoped to viewer-only role.
Request a creator or runner key, or perform the action via an operator account.
Attach Tools to Agents
BOSA and Managed Connectors
Platform-managed connectors (BOSA library) appear in the tool catalog with predefined IDs. Request enablement from the AIP operations team, then attach them like any other tool. Updates are handled centrally; monitor the changelog for new versions.
MCP Tool Discovery
Use the response to seed agent definitions or generate tool uploads where appropriate. The MCP guide covers credential rotation and live connection testing in detail.
Observability and Auditing
GET /tools/<id>returns metadata, version, and upload timestamps.GET /agents?tools=<id>surfaces reuse across agents.Leverage the Configuration management guide to export/import tools alongside agents for promotion pipelines.
Best Practices
Related Documentation
Agents guide — attach tools, manage
tool_configs, and run overrides.File processing — upload artifacts during agent runs and reuse chunk IDs.
Automation & scripting — script tool creation and promotion in CI.
Last updated