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
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| headerName | No | ||
| scheme | No |
Implementation Reference
- mcp-server.js:125-134 (handler)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 } },
- mcp-server.js:268-268 (schema)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"] },