Skip to main content
Glama

AI gateway

ai
DestructiveIdempotent

For reading use ai_read, which is read-only and needs no approval: "settings" here is deprecated (still works). The AI gateway for AI features inside the app (not for you: you are the AI that builds it). The app calls http://ai.local with the key in $LAZYFROG_AI_KEY instead of the provider's key, which stays with LazyFrog and never enters the app: OpenAI SDK baseURL $LAZYFROG_AI_URL/openai/v1, Anthropic SDK baseURL $LAZYFROG_AI_URL/anthropic, other OpenAI-compatible providers $LAZYFROG_AI_URL/compatible. Each environment has a monthly spend cap (default $5); at the cap requests fail with a clear error. action "settings": keys (last 4 characters), caps, spend this month by model. "key_set" (env, provider openai | anthropic | compatible, key; base_url for compatible, e.g. https://openrouter.ai/api/v1): better, send the owner to the link "settings" gives, where they paste it themselves (each environment has its own key: env "production" for the live site); tell them to set a spend limit at the provider too. "key_remove" (env, provider). "cap_set" (env, dollars a month).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project": "<project>",
      "action": "<action>"
    },
    "name": "ai"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNo
keyNo
actionYes
dollarsNo
projectYesProject slug or id.
base_urlNo
providerNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is partly covered. The description adds genuinely useful behavior: each environment has its own key, the provider key never enters the app, each environment has a monthly spend cap (default $5) and requests fail with a clear error at the cap. It does not say what key_remove or cap_set destroy or whether they are reversible, which matters for a destructive tool.

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

Conciseness4/5

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

Front-loading the ai_read routing and the deprecation warning is the right call, and the baseURL details are concrete rather than filler. The prose is dense and run-on, with asides like 'not for you: you are the AI that builds it' that add tone but not decision-relevant information.

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

Completeness3/5

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

For a 7-parameter destructive tool with no output schema, the description covers the domain model (keys, caps, environments, base URLs) well enough to act. Gaps remain around the unexplained 'project' parameter, per-action parameter requirements, and what key_remove/cap_set actually change.

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?

Schema description coverage is only 14%, so the description must carry the load, and it does for most fields: env ('production' for the live site, each environment has its own key), provider with the three enum values plus base_url for 'compatible' (with an OpenRouter example), key, and dollars as a monthly amount. The required 'project' parameter is never explained, and the description does not map parameters to specific actions.

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 names the resource (the AI gateway for in-app AI features) and enumerates the four actions it manages: settings, key_set, key_remove, cap_set. It also explicitly separates itself from the read-only sibling ai_read, so an agent can route correctly. It loses a point because the purpose statement is buried mid-paragraph after routing advice and a deprecation note.

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

Usage Guidelines4/5

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

It gives explicit routing guidance ('For reading use ai_read, which is read-only and needs no approval') and flags that the 'settings' action is deprecated but still works. It also recommends a preferred path over key_set: send the owner to the link that 'settings' returns so they paste the key themselves, and tell them to set a provider-side spend limit. No explicit when-not conditions beyond the ai_read split.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources