show_api_key
Retrieve the bearer token from MCP settings for debugging authentication issues with Jina AI's web content and search APIs.
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:37-53 (handler)The core implementation of the 'show_api_key' tool. Registers the tool with an empty input schema and an inline async handler function that retrieves and returns the bearer token from the current request props for debugging. Includes conditional registration based on tool enabling.if (isToolEnabled("show_api_key")) { 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/index.ts:21-21 (registration)Lists 'show_api_key' among all available tools for filtering and enabling."primer", "show_api_key", "read_url", "capture_screenshot_url", "guess_datetime_url",
- src/index.ts:15-15 (registration)Categorizes 'show_api_key' under 'utility' tools for tag-based filtering.utility: ["primer", "show_api_key", "expand_query", "guess_datetime_url", "extract_pdf"],
- src/index.ts:136-138 (helper)Extracts and sets the bearerToken from Authorization header or environment variable, which is used by the show_api_key handler.if (!props.bearerToken && env.JINA_API_KEY) { props.bearerToken = env.JINA_API_KEY; }
- src/index.ts:100-100 (registration)Calls registerJinaTools which contains the show_api_key registration, passing the server instance and props getter.registerJinaTools(server, () => currentProps, enabledTools);