get_solution
Retrieve the complete steps of a solution by its ID after searching. Calling this also boosts the solution's usability score.
Instructions
Get the full details of a specific solution by ID. Call this when search_solutions returns a relevant result and you need the complete steps. Also boosts the solution's usability score.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| postId | Yes | The solution post ID from search results |
Implementation Reference
- src/index.ts:234-237 (handler)The handler function for get_solution tool. It takes a postId, makes a GET request to /solutions/{postId} via the apiRequest helper, and returns the formatted result.
async ({ postId }) => { const res = await apiRequest("GET", `/solutions/${encodeURIComponent(postId)}`); return formatResult(res); }, - src/index.ts:227-228 (schema)The input schema for get_solution, requiring a single string parameter 'postId' described as 'The solution post ID from search results'.
postId: z.string().describe("The solution post ID from search results"), }, - src/index.ts:222-238 (registration)Registration of the 'get_solution' tool on the MCP server using server.tool(), including its name, description, input schema, metadata (title, readOnlyHint, openWorldHint), and handler.
// Tool 2: get_solution server.tool( "get_solution", "Get the full details of a specific solution by ID. Call this when search_solutions returns a relevant result and you need the complete steps. Also boosts the solution's usability score.", { postId: z.string().describe("The solution post ID from search results"), }, { title: "Get solution details", readOnlyHint: true, openWorldHint: true, }, async ({ postId }) => { const res = await apiRequest("GET", `/solutions/${encodeURIComponent(postId)}`); return formatResult(res); }, );