sodax_get_solver_intent
Get solver-side details and fill history for an intent hash. Use includeAll to view all related documents.
Instructions
Get solver-side details for an intent including fill history. Use includeAll to see all solver documents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| intentHash | Yes | The intent hash to look up | |
| includeAll | No | Include all intent documents (history) instead of just the latest | |
| format | No | Response format: 'json' for raw data or 'markdown' for formatted text | markdown |
Implementation Reference
- src/tools/sodaxApi.ts:739-773 (handler)MCP tool registration and handler for 'sodax_get_solver_intent'. Defines the tool with Zod schema (intentHash, includeAll, format), calls getSolverIntent service, and returns formatted response.
// Tool 20: Get Solver Intent Details server.tool( "sodax_get_solver_intent", "Get solver-side details for an intent including fill history. Use includeAll to see all solver documents.", { intentHash: z.string() .describe("The intent hash to look up"), includeAll: z.boolean().optional().default(false) .describe("Include all intent documents (history) instead of just the latest"), format: z.nativeEnum(ResponseFormat).optional().default(ResponseFormat.MARKDOWN) .describe("Response format: 'json' for raw data or 'markdown' for formatted text") }, READ_ONLY, async ({ intentHash, includeAll, format }) => { try { const intent = await getSolverIntent(intentHash, includeAll); if (!intent) { return { content: [{ type: "text", text: `Solver intent not found: ${intentHash}` }] }; } return { content: [{ type: "text", text: `## Solver Intent Details\n\n` + formatResponse(intent, format) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }], isError: true }; } } ); - src/services/sodaxApi.ts:494-513 (helper)Service function that makes the actual HTTP GET request to /solver/intents/:intentHash. Handles includeAll query param and 404 responses.
/** * Get solver intent details by intent hash */ export async function getSolverIntent(intentHash: string, includeAll?: boolean): Promise<unknown> { try { const params = new URLSearchParams(); if (includeAll) params.append("includeAll", "true"); const queryString = params.toString(); const url = `/solver/intents/${intentHash}${queryString ? `?${queryString}` : ""}`; const response = await apiClient.get(url); return response.data; } catch (error) { if (axios.isAxiosError(error) && error.response?.status === 404) { return null; } console.error("Error fetching solver intent:", error); throw new Error("Failed to fetch solver intent from SODAX API"); } } - src/tools/sodaxApi.ts:743-750 (schema)Zod input schema for sodax_get_solver_intent: intentHash (required string), includeAll (optional boolean, default false), format (optional ResponseFormat enum, default markdown).
{ intentHash: z.string() .describe("The intent hash to look up"), includeAll: z.boolean().optional().default(false) .describe("Include all intent documents (history) instead of just the latest"), format: z.nativeEnum(ResponseFormat).optional().default(ResponseFormat.MARKDOWN) .describe("Response format: 'json' for raw data or 'markdown' for formatted text") }, - src/index.ts:243-244 (registration)Tool is registered in the 'intents' category listing for the startup status report.
"sodax_get_solver_intent" ], - API drift check entry mapping GET /solver/intents/:intentHash to the sodax_get_solver_intent tool with params intentHash and includeAll.
"GET /solver/intents/:intentHash": { tool: "sodax_get_solver_intent", params: ["intentHash", "includeAll"], requiredParams: ["intentHash"], },