{"record":{"id":"d3236103ae5b17ba","repo":"mastra-ai/mastra","slug":"tool-provider-providerid-does-not-support-getto","errorCode":null,"errorMessage":"Tool provider ${providerId} does not support getToolSchema","messagePattern":"Tool provider (.+?) does not support getToolSchema","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"packages/server/src/server/handlers/tool-providers.ts","lineNumber":243,"sourceCode":"/**\n * GET /tool-providers/:providerId/tools/:toolSlug/schema — Tool schema.\n */\nexport const GET_TOOL_PROVIDER_TOOL_SCHEMA_ROUTE = createRoute({\n  method: 'GET',\n  path: '/tool-providers/:providerId/tools/:toolSlug/schema',\n  responseType: 'json',\n  pathParamSchema: toolSlugPathParams,\n  responseSchema: getToolProviderToolSchemaResponseSchema,\n  summary: 'Get tool provider tool schema',\n  description: 'Returns the schema for a specific tool from a tool provider',\n  tags: ['Tool Providers'],\n  requiresAuth: true,\n  handler: async ({ mastra, providerId, toolSlug }) => {\n    try {\n      const editor = requireEditor(mastra.getEditor());\n      const provider = await resolveProvider(editor, providerId);\n      if (!provider.getToolSchema) {\n        throw new HTTPException(404, { message: `Tool provider ${providerId} does not support getToolSchema` });\n      }\n      const schema = await provider.getToolSchema(toolSlug);\n      if (!schema) {\n        throw new HTTPException(404, { message: `Schema for tool ${toolSlug} not found in provider ${providerId}` });\n      }\n      return schema;\n    } catch (error) {\n      return handleError(error, 'Error getting tool provider tool schema');\n    }\n  },\n});\n\n/**\n * POST /tool-providers/:providerId/authorize — Start an OAuth flow and persist\n * a `tool_provider_connections` row for label / scope joins.\n */\nexport const AUTHORIZE_TOOL_PROVIDER_ROUTE = createRoute({\n  method: 'POST',","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/tool-providers.ts#L225-L261","documentation":"HTTP 404 thrown by the get-tool-schema handler when the resolved ToolProvider exists but does not implement the optional getToolSchema method. The Mastra ToolProvider interface makes schema lookup optional, so providers that only supply auth/connections cannot serve per-tool schemas.","triggerScenarios":"GET /api/tool-providers/:providerId/tools/:toolSlug/schema (handler at tool-providers.ts:243) against a provider registered without a getToolSchema implementation.","commonSituations":"Pointing the playground/schema UI at a custom provider that only implements listTools or authorize; upgrading to a provider version where getToolSchema was removed; using a built-in provider type that intentionally has no schema support.","solutions":["Implement getToolSchema(toolSlug) on the ToolProvider class and re-register it.","Use a provider that supports tool schemas if the consumer needs them.","Guard the client: check provider capabilities (or catch 404) before requesting a schema.","If the provider should support schemas, check for a newer provider package version that adds getToolSchema."],"exampleFix":"// before\nclass MyProvider implements ToolProvider { listTools() { /* ... */ } }\n// after\nclass MyProvider implements ToolProvider {\n  listTools() { /* ... */ }\n  async getToolSchema(toolSlug: string) {\n    return this.schemas.get(toolSlug) ?? null;\n  }\n}","handlingStrategy":"type-guard","validationCode":"const provider = await api.getProvider(providerId);\nif (typeof provider?.getToolSchema !== 'function') {\n  console.warn(`Provider ${providerId} does not support tool schemas`);\n}","typeGuard":"function supportsGetToolSchema(p: ToolProvider): p is ToolProvider & Required<Pick<ToolProvider, 'getToolSchema'>> {\n  return typeof p.getToolSchema === 'function';\n}","tryCatchPattern":"try {\n  return await api.getToolSchema(providerId, toolSlug);\n} catch (e) {\n  if (e.status === 404 && /does not support getToolSchema/.test(e.message)) return null;\n  throw e;\n}","preventionTips":["Check provider capabilities before rendering schema-dependent UI.","Document which optional ToolProvider methods each custom provider implements.","Keep provider implementations up to date with the ToolProvider interface."],"tags":["http-404","tool-providers","missing-capability","server"],"backgroundTag":"unsupported-provider-capability","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}