Skip to main content
Glama

venice_retrieve_api_key

Retrieve details for a specific API key in Venice AI's system to manage access to AI capabilities like chat, image generation, and text-to-speech.

Instructions

Get details for a specific API key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
key_idYesThe API key ID to retrieve

Implementation Reference

  • Full tool handler implementation for 'venice_retrieve_api_key'. Registers the tool with schema for 'key_id' input, fetches details from Venice API endpoint `/api_keys/{key_id}`, and returns JSON data or error message.
    server.tool(
      "venice_retrieve_api_key",
      "Get details for a specific API key",
      { key_id: z.string().describe("The API key ID to retrieve") },
      async ({ key_id }) => {
        const response = await veniceAPI(`/api_keys/${key_id}`);
        const data = await response.json() as { data?: Record<string, unknown>; error?: { message?: string } };
        if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] };
        return { content: [{ type: "text" as const, text: JSON.stringify(data.data, null, 2) }] };
      }
  • Input schema for the tool: requires 'key_id' as string.
    { key_id: z.string().describe("The API key ID to retrieve") },
  • Tool registration call within registerAdminTools function.
    server.tool(
      "venice_retrieve_api_key",
      "Get details for a specific API key",
      { key_id: z.string().describe("The API key ID to retrieve") },
      async ({ key_id }) => {
        const response = await veniceAPI(`/api_keys/${key_id}`);
        const data = await response.json() as { data?: Record<string, unknown>; error?: { message?: string } };
        if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] };
        return { content: [{ type: "text" as const, text: JSON.stringify(data.data, null, 2) }] };
      }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Get details'), but does not specify if it requires authentication, rate limits, error handling, or what details are returned (e.g., key metadata, permissions). This leaves significant gaps in understanding the tool's behavior.

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, clear sentence with no wasted words. It is front-loaded and efficiently conveys the core action, making it easy to parse without unnecessary elaboration.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description is incomplete. It does not explain what 'details' are returned (e.g., key name, creation date, permissions), leaving the agent uncertain about the response format. This gap reduces the tool's usability in a broader context.

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

Parameters3/5

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

The input schema has 100% description coverage, with 'key_id' clearly documented as 'The API key ID to retrieve'. The description adds no additional meaning beyond this, such as format examples or constraints. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the parameter documentation adequately.

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 'Get details for a specific API key' clearly states the verb ('Get') and resource ('API key'), making the purpose understandable. However, it does not explicitly differentiate from its sibling 'venice_list_api_keys', which might retrieve multiple keys, leaving some ambiguity in scope.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'venice_list_api_keys' or 'venice_create_api_key'. It lacks context on prerequisites, such as needing an existing key ID, or exclusions, making it minimally helpful for decision-making.

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/georgeglarson/venice-mcp'

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