get_capabilities
Retrieve server version, mode, API base, and list of exposed tools to confirm compatibility before executing a sequence of calls.
Instructions
Return the server's version, mode (human vs autonomous-agent), API base, and the list of currently-exposed tools. Useful for the LLM to confirm tool-schema compatibility before issuing a sequence of calls — call once at session start if you need to branch on capabilities.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:780-795 (handler)The 'get_capabilities' handler inside the CallToolRequestSchema switch. It builds a capabilities object with server name, version, mode (human/agent), API base, and the filtered list of exposed tool names, then returns it as JSON text content.
case "get_capabilities": { const exposedTools = ALL_TOOLS .filter((t) => AGENT_MODE || !AGENT_MODE_ONLY_TOOLS.has(t.name)) .map((t) => t.name); const capabilities = { server: "autonomad-travel", version: PACKAGE_VERSION, mode: AGENT_MODE ? "agent" : "human", api_base: API_BASE, tools: exposedTools, notes: AGENT_MODE ? "Autonomous-agent mode: register_agent + DID-based booking flows are exposed." : "Human-mode (default): bookings flow through create_booking_intent → autonomad.ai web checkout. First booking unlocks a 1-month free Autonomad Premium trial.", }; return { content: [{ type: "text", text: JSON.stringify(capabilities, null, 2) }] }; } - src/server.ts:476-484 (schema)The 'get_capabilities' tool definition/schema in the ALL_TOOLS array. It has an empty inputSchema (no parameters), and a description explaining it returns server version, mode, API base, and exposed tools.
{ name: "get_capabilities", description: "Return the server's version, mode (human vs autonomous-agent), API base, and the list of currently-exposed tools. Useful for the LLM to confirm tool-schema compatibility before issuing a sequence of calls — call once at session start if you need to branch on capabilities.", inputSchema: { type: "object" as const, properties: {}, }, }, - src/server.ts:503-517 (registration)Tool annotation for 'get_capabilities' in TOOL_ANNOTATIONS, marking it as readOnlyHint: true, idempotentHint: true, openWorldHint: false. This annotation is attached when the tool list is returned to clients.
const TOOL_ANNOTATIONS: Record<string, { title: string; readOnlyHint?: boolean; destructiveHint?: boolean; idempotentHint?: boolean; openWorldHint?: boolean }> = { register_agent: { title: "Register as an Autonomad Agent", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, search_hotels: { title: "Search Hotels", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, search_flights: { title: "Search Flights", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, search_transport: { title: "Search Ground Transport", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, search_dining: { title: "Search Restaurants & Dining", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, search_activities: { title: "Search Activities & Experiences", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, search_events: { title: "Search Live Events & Tickets", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, manage_trip: { title: "Manage Trip Lifecycle", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true }, create_booking: { title: "Create Hotel Booking", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, manage_booking: { title: "Manage Existing Booking", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true }, submit_feedback: { title: "Submit Post-Stay Feedback", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, check_rewards: { title: "Check $NOMD Rewards Balance", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, create_booking_intent: { title: "Create Booking Deep-Link", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, get_capabilities: { title: "Get Connector Capabilities", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }, - src/server.ts:525-532 (registration)The ListToolsRequestSchema handler that registers ALL_TOOLS (including get_capabilities) with annotations. The tool is filtered based on AGENT_MODE and included in the list exposed to clients.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: ALL_TOOLS .filter((t) => AGENT_MODE || !AGENT_MODE_ONLY_TOOLS.has(t.name)) .map((t) => { const a = TOOL_ANNOTATIONS[t.name]; return a ? { ...t, annotations: a } : t; }), }));