Skip to main content
Glama
wlmwwx
by wlmwwx

show_api_key

Retrieve the bearer token from MCP settings for debugging authentication in Jina AI's web tools and search capabilities.

Instructions

Return the bearer token from the Authorization header of the MCP settings, which is used to debug.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'show_api_key' tool with server.tool. Includes empty input schema, description, and an inline async handler function that fetches the bearer token from props and returns it as text content, or an error if not found.
    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 }], }; }, );
  • Inline handler function for the 'show_api_key' tool. Retrieves the bearerToken from the current request props using getProps(), checks if it exists, and returns it as a text content item or an error response.
    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 }], }; },
  • Helper function createErrorResponse used by the show_api_key handler (and other tools) to return standardized error responses.
    const createErrorResponse = (message: string) => ({ content: [{ type: "text" as const, text: message }], isError: true, });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wlmwwx/jina-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server