import { z } from "zod";
const schema = z.object({});
export const getToolGuideTool = {
name: "get_tool_guide",
description:
"Return a concise usage guide with workflows, dependencies, and examples for this MCP.",
parameters: schema,
execute: async () => {
try {
const guide = {
overview:
"Use this guide to pick the right tool, understand dependencies, and see example inputs.",
workflows: [
{
name: "Find a market and get live prices",
steps: [
"search_markets(query, limit) to find events/markets",
"get_market_details(slug) for full metadata and clobTokenIds",
"get_order_book/get_midpoint/get_spread/get_current_price with token_id",
],
example: {
search_markets: { query: "election", limit: 3 },
get_market_details: { slug: "will-biden-win-2024" },
get_order_book: { token_id: "clobTokenIds[0]" },
},
},
{
name: "Batch price checks",
steps: [
"list_active_markets or get_market_details for clobTokenIds",
"get_batch_prices/get_batch_spreads/get_batch_order_books with token_ids",
],
example: {
get_batch_prices: { token_ids: ["clobTokenIds[0]", "clobTokenIds[1]"] },
},
},
{
name: "Comments for an event/series/market",
steps: [
"list_events/list_series/list_markets to get id",
"list_comments with parent_entity_type + parent_entity_id",
],
example: {
list_comments: { parent_entity_type: "Event", parent_entity_id: 80505 },
},
},
{
name: "Realtime subscriptions",
steps: [
"subscribe_market_prices/subscribe_orderbook_updates",
"get_realtime_status to verify connection and recent messages",
"unsubscribe_realtime when done",
],
example: {
subscribe_market_prices: { slug: "will-biden-win-2024" },
},
},
],
notes: [
"clobTokenIds come from list_active_markets or get_market_details.",
"CLOB tools return 404 when token has no active order book.",
"get_price_history may return history=[] when no trades exist.",
"list_comments typically requires parent_entity_type + parent_entity_id.",
"search_markets limit applies per type (events/markets/profiles).",
"get_bridge_transaction_status requires an address with bridge history.",
],
};
return JSON.stringify(guide, null, 2);
} catch (error) {
return JSON.stringify({ error: error instanceof Error ? error.message : String(error) });
}
},
};