show_api_key
Retrieve the bearer token from the Authorization header in MCP settings for debugging purposes on Jina AI Remote MCP Server.
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:32-41 (handler)The handler function that executes the show_api_key tool logic: retrieves the bearer token from props and returns it as text content or an error response if not present.async () => { const props = getProps(); const token = props.bearerToken as string; if (!token) { return createErrorResponse("No bearer token found in request"); } return { content: [{ type: "text" as const, text: token }], }; },
- src/tools/jina-tools.ts:28-42 (registration)Registration of the show_api_key tool using McpServer.tool() with name, description, empty input schema {}, and the 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 createErrorResponse("No bearer token found in request"); } return { content: [{ type: "text" as const, text: token }], }; }, );
- src/tools/jina-tools.ts:22-25 (helper)Helper function createErrorResponse used by the show_api_key handler to format error responses.const createErrorResponse = (message: string) => ({ content: [{ type: "text" as const, text: message }], isError: true, });