Skip to main content
Glama

keyInfo

Check API key status and usage statistics to manage your account permissions and monitor request counts.

Instructions

Returns API key details and usage stats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.js:607-616 (registration)
    Registration of the 'keyInfo' tool with the MCP server, including its description and schema (no inputs needed). The handler is inline.
    server.tool("keyInfo",
      "Returns API key details and usage stats.",
      {},
      async () => {
        return handleEndpoint(async () => {
          const data = await makeApiRequest(apiKey, '/v1/key/info')
          return formatResponse(data)
        })
      }
    )
  • Handler function for keyInfo: makes a GET request to /v1/key/info and formats the response.
    async () => {
      return handleEndpoint(async () => {
        const data = await makeApiRequest(apiKey, '/v1/key/info')
        return formatResponse(data)
      })
    }
  • Schema for keyInfo: description string and empty input schema (no parameters).
    "Returns API key details and usage stats.",
    {},
  • Wrapper function that catches errors from endpoint handlers and formats error responses.
    async function handleEndpoint(apiCall) {
      try {
        return await apiCall()
      } catch (error) {
        return formatErrorResponse(error.message, error.status || 403)
      }
    }
  • Helper that makes authenticated GET requests to the CoinMarketCap Pro API.
    async function makeApiRequest(apiKey, endpoint, params = {}) {
      const queryParams = new URLSearchParams()
      Object.entries(params).forEach(([key, value]) => {
        if (value !== undefined) {
          queryParams.append(key, value.toString())
        }
      })
    
      const url = `https://pro-api.coinmarketcap.com${endpoint}${queryParams.toString() ? `?${queryParams.toString()}` : ''}`
    
      const response = await fetch(url, {
        method: 'GET',
        headers: {
          'Accept': 'application/json',
          'X-CMC_PRO_API_KEY': apiKey,
        }
      })
    
      if (!response.ok) {
        throw new Error(`Error fetching data from CoinMarketCap: ${response.statusText}`)
      }
    
      return await response.json()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Returns') but does not explicitly state that it is non-destructive, requires authentication, or any rate limits. More transparency is needed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of six words, highly concise and front-loaded with the verb 'Returns'. Every word earns its place with no waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has zero parameters and no output schema, the description is largely complete. However, it could be enhanced by mentioning the specific attributes returned (e.g., plan, usage limits) to improve utility.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, and schema coverage is 100%. The description does not need to add parameter information; the baseline for zero parameters is 4, and the description meets expectations.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns API key details and usage stats, using a specific verb and resource. It distinguishes itself from siblings as the only tool dealing with API key info, though it could be more specific about what 'key details' include.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives, but since no other sibling tool provides API key info, usage is implied. The description lacks context about prerequisites or typical scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/shinzo-labs/coinmarketcap-mcp'

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