Skip to main content
Glama

llmkit_list_keys

Read-onlyIdempotent

View all API keys, their current status, and creation dates to manage AI service access and track usage across multiple providers.

Instructions

List all API keys with status and creation date

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYes

Implementation Reference

  • The implementation of the 'handleListKeys' function, which fetches and formats the API keys list.
    export async function handleListKeys() {
      const keyData = await getKeys();
      const keys = keyData.keys.map(k => ({
        name: k.name, prefix: k.key_prefix, status: k.revoked_at ? 'revoked' : 'active', created: k.created_at.slice(0, 10),
      }));
    
      if (!keys.length) return ok('No API keys found.', { keys });
    
      return ok([
        'API Keys',
        '\u2500'.repeat(25),
        ...keys.map(k => `${k.name} (${k.prefix}...) - ${k.status.toUpperCase()} - created ${k.created}`),
      ].join('\n'), { keys });
    }
  • The definition and registration of the 'llmkit_list_keys' tool, including its schema and registration in the handler map.
    name: 'llmkit_list_keys',
    description: 'List all API keys with status and creation date',
    inputSchema: { type: 'object' as const, properties: {} },
    outputSchema: {
      type: 'object' as const,
      properties: {
        keys: { type: 'array', items: { type: 'object', properties: { name: { type: 'string' }, prefix: { type: 'string' }, status: { type: 'string' }, created: { type: 'string' } } } },
      },
      required: ['keys'],
    },

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/smigolsmigol/llmkit-mcp-server'

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