Tools
A tool is a registration of an MCP server — or a stdio command, SSE/WebSocket endpoint, or direct function — inside a workspace. Once registered, a tool is granted to an agent through that agent's tool_scope (e.g. ["web_search", "github.*"]), and the runner exposes the matching methods to the model. Tools are workspace-scoped, like skills, and versioned: each registration introspects the tool's method catalog and stores it as a ToolVersion keyed by an 8-char catalogHash, so schema drift is captured as a new version rather than a silent mutation.
See MCP for how Harmony connects to and proxies MCP servers at runtime, and Skills for the agent contract that consumes these tools.
Only the workspace-level list and register routes exist today:
GETandPOST /api/v1/workspaces/{slug}/tools. There are no per-tool or per-version HTTP routes yet — thename_takenerror references aPOST /tools/{name}/versionsroute that is planned but not exposed. Live introspection of registered servers also lands later (Sprint 5, with Runs).
Tool spec shape
The POST body is validated against toolSpecSchema:
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | 1–80 chars, ^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$ — lowercase, may contain . _ -. Unique per workspace. |
transport | enum | yes | One of mcp_stdio, mcp_sse, mcp_websocket, direct_function. |
endpoint | string | yes | 1–2000 chars. URL for mcp_sse / mcp_websocket; command for mcp_stdio; ref for direct_function. |
catalog | array | no | The tool's methods. Defaults to []. Each entry: { name: string, description?: string, input_schema?: any }. |
The catalog is canonicalised and hashed to derive the version's catalogHash. Credential bindings (requiredConfig) and registry references (registryRef) exist on the Tool model for the deploy flow but are not settable through this endpoint.
GET /api/v1/workspaces/{slug}/tools
List tools in a workspace. Returns the latest version of each, ordered by name.
curl https://platform.groupany.ai/api/v1/workspaces/groupany/tools \
-H "Authorization: Bearer $HARMONY_KEY"
Response 200:
{
"tools": [
{
"id": "cm...",
"name": "linear",
"transport": "mcp_sse",
"endpoint": "https://mcp.linear.app/sse",
"created_at": "2026-05-29T09:00:00.000Z",
"version_count": 2,
"latest_catalog_hash": "a1b2c3d4",
"tool_count": 14
}
]
}
tool_count is the number of methods in the latest version's catalog; latest_catalog_hash identifies that version.
POST /api/v1/workspaces/{slug}/tools
Register a new tool. Introspects (or accepts) the method catalog and creates the tool plus its first ToolVersion.
curl -X POST https://platform.groupany.ai/api/v1/workspaces/groupany/tools \
-H "Authorization: Bearer $HARMONY_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"name": "linear",
"transport": "mcp_sse",
"endpoint": "https://mcp.linear.app/sse",
"catalog": [
{
"name": "create_issue",
"description": "Create a Linear issue",
"input_schema": { "type": "object", "properties": { "title": { "type": "string" } } }
}
]
}'
Response 201:
{
"tool": {
"id": "cm...",
"name": "linear",
"transport": "mcp_sse",
"endpoint": "https://mcp.linear.app/sse",
"created_at": "2026-05-30T12:00:00.000Z",
"version_count": 1,
"latest_catalog_hash": "a1b2c3d4",
"tool_count": 1
},
"uri": "harmony://ws/groupany/tools/linear@a1b2c3d4"
}
Requires admin or owner role. Honours the Idempotency-Key header per the API overview.
Errors:
| Status | Code | When |
|---|---|---|
400 | invalid_json | Body is not valid JSON |
400 | validation_failed | Spec fails toolSpecSchema (bad name, unknown transport, missing endpoint, malformed catalog) |
403 | forbidden | Member role insufficient |
409 | name_taken | A tool with this name already exists in the workspace |