show_api_key
Retrieve the bearer token from the Authorization header for debugging purposes on Jina AI Remote MCP Server. Essential for accessing and testing API functionality.
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-36 (handler)Handler function that returns the bearer token from MCP request props or an error if no token is present.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, with description, empty input schema, and inline handler function.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, }, ], }; }, );
- src/tools/jina-tools.ts:12-12 (schema)Empty input schema (no parameters) for the 'show_api_key' tool.{},