Skip to main content
Glama

elfa_set_auth

Configure authentication for ELFA API by setting API key, header name, and authorization scheme to access sentiment data and trending tokens for crypto market analysis.

Instructions

Set ELFA API auth. Params: key (string), headerName (Authorization|x-elfa-api-key), scheme (e.g., Bearer).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
headerNameNo
schemeNo

Implementation Reference

  • The main handler function that implements the logic for the 'elfa_set_auth' tool. It updates the global ELFA_AUTH object with the provided key, headerName, and scheme parameters, performing basic validation.
    "elfa_set_auth": async (args) => { const key = args && args.key; const headerName = args && args.headerName; const scheme = args && args.scheme; if (!key || typeof key !== "string") return { content: textContent({ ok:false, message:"Missing 'key' (string)" }), isError:true }; if (headerName && typeof headerName === "string") ELFA_AUTH.headerName = headerName; if (scheme !== undefined && typeof scheme === "string") ELFA_AUTH.scheme = scheme; ELFA_AUTH.key = key; return { content: textContent({ ok:true, headerName: ELFA_AUTH.headerName || "", scheme: ELFA_AUTH.scheme || "", key: maskKey(ELFA_AUTH.key) }) }; },
  • mcp-server.js:266-270 (registration)
    The tool registration entry in the tools array, which defines the name, description, input schema (including properties and required fields), and annotations for the 'elfa_set_auth' tool.
    { name:"elfa_set_auth", description:"Set ELFA API auth. Params: key (string), headerName (Authorization|x-elfa-api-key), scheme (e.g., Bearer).", inputSchema:{ type:"object", properties:{ key:{type:"string"}, headerName:{type:"string"}, scheme:{type:"string"} }, required:["key"] }, annotations:{ title:"ELFA: Set Auth", readOnlyHint:false, openWorldHint:false } },
  • The inputSchema definition specifying the expected parameters: key (required string), headerName (string), scheme (string).
    inputSchema:{ type:"object", properties:{ key:{type:"string"}, headerName:{type:"string"}, scheme:{type:"string"} }, required:["key"] },

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/JCF0/cg-alpha-mcp'

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