Skip to main content

Overview

The Tools API provides direct access to the tool registry in Shannon. You can list available tools, inspect their parameter schemas, and execute tools directly without going through a full task workflow.

Features

  • Tool discovery — browse all available tools with category filtering
  • JSON Schema inspection — retrieve full parameter schemas for any tool
  • Direct execution — invoke tools outside of agent workflows
  • Dangerous tool blocking — hazardous tools are automatically hidden and blocked at the gateway level
  • Usage tracking — token consumption and cost are recorded per execution
  • Session context — optionally bind execution to a session (sanitized to session_id and user_id only)

Security Model

Shannon enforces a strict safety boundary around tools marked as dangerous:
  • List endpoint automatically applies exclude_dangerous=true — dangerous tools are never exposed
  • Get and Execute endpoints return 403 Forbidden if the requested tool is marked dangerous
  • Tool metadata is cached in-memory for 5 minutes per gateway instance
  • The HTTP client timeout for tool execution is 120 seconds
Dangerous tools cannot be accessed through any public API endpoint. This restriction is enforced at the gateway level and cannot be overridden by clients.

List Tools

List all available tools. Dangerous tools are automatically excluded.

Query Parameters

Example with Category Filter

Response

Get Tool

Get metadata and parameter schema for a specific tool.

Path Parameters

Response

Execute Tool

Execute a tool directly with the provided arguments.

Path Parameters

Request Body

When a session_id is provided, only session_id and user_id are passed to the tool. Other session fields such as tenant_id are stripped for security.

Response

Response Fields

Usage is recorded asynchronously (fire-and-forget) to the token_usage table. Token counts are synthetic: max(100, int(cost_usd / 0.000002)).

Tool Response Object

Error Responses

All errors follow the standard format:

Dangerous Tool Error

Attempting to access a dangerous tool via Get or Execute returns:

Next Steps

Custom Tools

Learn how to create and register custom tools

Agents

Configure agents that use tools automatically