show_api_key
Retrieve the bearer token from MCP settings for debugging authentication issues with Jina AI web tools.
Instructions
Return the bearer token from the Authorization header of the MCP settings, which is used to debug.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/jina-tools.ts:13-35 (handler)The async handler function for the 'show_api_key' tool. It retrieves the bearer token from the request props and returns it as text content, or an error message if no token is found.async () => { const props = getProps(); const token = props.bearerToken as string; if (!token) { return { content: [ { type: "text" as const, text: "No bearer token found in request", }, ], isError: true, }; } return { content: [ { type: "text" as const, text: token, }, ], }; },
- src/tools/jina-tools.ts:9-36 (registration)Registration of the 'show_api_key' tool via server.tool call within registerJinaTools function, including name, description, empty schema, and inline handler.server.tool( "show_api_key", "Return the bearer token from the Authorization header of the MCP settings, which is used to debug.", {}, async () => { const props = getProps(); const token = props.bearerToken as string; if (!token) { return { content: [ { type: "text" as const, text: "No bearer token found in request", }, ], isError: true, }; } return { content: [ { type: "text" as const, text: token, }, ], }; }, );