Skip to main content
Glama

ai_ask_batch

Read-only

AI ask batch (up to 8 prompts) — Answer up to 8 independent prompts in one GET call with the Workers AI LLM (llama-3.3-70b). Pass ?prompts= separated by || (or a JSON array of strings) and optional ?system= applied to every prompt. Returns one answer per prompt with word counts; failed items are listed with an error. Cheaper and faster than 8 separate ai/ask calls. Price: $0.04 USDC (Base, via x402).

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": {
      "prompts": "<prompts>"
    },
    "name": "ai_ask_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptsYese.g. What is the capital of France?||Name three primary colors.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnly/openWorld/non-destructive), the description discloses the model, the return shape (one answer per prompt with word counts), partial-failure behavior (failed items listed with an error), and the commercial terms ($0.04 USDC on Base via x402). These are exactly the operational facts an agent cannot infer from structured fields.

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?

Front-loaded with the capability and limit, then input syntax, then return/error behavior, then cost — four tight sentences with no repetition. Nothing could be deleted without losing an operational fact.

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

Completeness5/5

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

For a one-parameter tool with no output schema, the description covers input encoding, output shape, error semantics, and payment requirements. An agent has everything needed to call it and interpret the result.

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?

Schema coverage is 100% and the single param has an example, so the baseline is 3; the description still adds real meaning by specifying the '||' separator and the JSON-array alternative for prompts, plus a '?system=' value applied to every prompt. The only blemish is that ?system is described but does not appear in the input schema, so an agent may look for a parameter that the schema does not expose.

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

Purpose5/5

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

The description gives a specific verb and resource ('Answer up to 8 independent prompts in one GET call') plus the backing model (llama-3.3-70b). It also explicitly distinguishes itself from the ai_ask sibling by being 'Cheaper and faster than 8 separate ai/ask calls,' so an agent can select between them without opening either schema.

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?

Clear context for use: up to 8 independent prompts in a single call, with the cost/speed rationale against making 8 separate ai/ask calls. The word 'independent' implicitly excludes dependent/chained prompts, but there is no explicit statement of when not to batch (e.g., a single prompt should go to ai_ask).

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