elfa_set_auth
Configure authentication for ELFA API requests by specifying key, header name, and scheme. Essential for integrating ELFA's sentiment data with crypto market analysis tools on CG Alpha MCP.
Instructions
Set ELFA API auth. Params: key (string), headerName (Authorization|x-elfa-api-key), scheme (e.g., Bearer).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| headerName | No | ||
| key | Yes | ||
| scheme | No |
Implementation Reference
- mcp-server.js:125-134 (handler)The async handler function that implements the core logic of elfa_set_auth by updating the global ELFA_AUTH object with the provided key, headerName, and scheme."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 object in the tools array, including description, input schema for validation, and annotations. Used in tools/list response.{ 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 } },
- mcp-server.js:268-268 (schema)The inputSchema defining the expected parameters for the elfa_set_auth tool.inputSchema:{ type:"object", properties:{ key:{type:"string"}, headerName:{type:"string"}, scheme:{type:"string"} }, required:["key"] },