Skip to main content
Glama

LLM chat completion

blackwood_llm_chat
Read-onlyIdempotent

Use when you need an llm chat completion for summaries, extraction or classification from a cheap open model. Do not use for frontier models, tool calling or streaming. Returns JSON with a chat completion from IBM Granite 4.0 Micro on Workers AI, with token usage for 0.002 USDC per thousand tokens, up to 0.03 USDC per call (clients without upto pay the cap). Result in the same call (about 8000 ms); a status tool polls for free if it takes longer. Category: Inference.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messagesYesConversation so far, oldest first, e.g. [{"role": "user", "content": "Summarize: ..."}]
maxTokensNoMaximum tokens to generate (1-4096, 512 when omitted); billed as requested
temperatureNoSampling temperature (0-2), e.g. 0.2 for near-deterministic output
response_formatNoconcise (the default when omitted) keeps the JSON short: long fields such as base64 images or audio come back as separate image/audio content blocks and other long strings are cut with a marker; detailed returns the full JSON

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "done": {
      -        "type": "boolean"
      -      },
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "message": {
      -            "type": "string"
      -          },
      -          "name": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "name",
      -          "message"
      -        ],
      -        "type": "object"
      -      },
      -      "jobId": {
      -        "type": "string"
      -      },
      -      "output": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "content": {
      -            "type": "string"
      -          },
      -          "finishReason": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "model": {
      -            "type": "string"
      -          },
      -          "usage": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "completionTokens": {
      -                "maximum": 9007199254740991,
      -                "minimum": -9007199254740991,
      -                "type": "integer"
      -              },
      -              "promptTokens": {
      -                "maximum": 9007199254740991,
      -                "minimum": -9007199254740991,
      -                "type": "integer"
      -              }
      -            },
      -            "required": [
      -              "promptTokens",
      -              "completionTokens"
      -            ],
      -            "type": "object"
      -          }
      -        },
      -        "required": [
      -          "model",
      -          "content",
      -          "finishReason",
      -          "usage"
      -        ],
      -        "type": "object"
      -      },
      -      "pollUrl": {
      -        "type": "string"
      -      },
      -      "status": {
      -        "enum": [
      -          "queued",
      -          "running",
      -          "paused",
      -          "errored",
      -          "terminated",
      -          "complete",
      -          "waiting",
      -          "waitingForPause",
      -          "rollingBack",
      -          "unknown"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "jobId",
      -      "status",
      -      "done",
      -      "pollUrl"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "description": "x402 PaymentRequired (returned with isError when payment is needed)",
      -    "properties": {
      -      "accepts": {
      -        "items": {
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "error": {
      -        "type": "string"
      -      },
      -      "extensions": {
      -        "type": "object"
      -      },
      -      "resource": {
      -        "type": "object"
      -      },
      -      "x402Version": {
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "x402Version",
      -      "accepts"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "done": {
      +        "type": "boolean"
      +      },
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "message": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "jobId": {
      +        "type": "string"
      +      },
      +      "next": {
      +        "additionalProperties": false,
      +        "description": "Suggested next paid call in the same family (call it in a loop when the task continues)",
      +        "properties": {
      +          "method": {
      +            "enum": [
      +              "GET",
      +              "POST"
      +            ],
      +            "type": "string"
      +          },
      +          "sample": {
      +            "description": "Free fixed sample of the whole family",
      +            "type": "string"
      +          },
      +          "service": {
      +            "description": "Service id of the suggested next paid call",
      +            "type": "string"
      +          },
      +          "tool": {
      +            "description": "MCP tool name of the same call",
      +            "type": "string"
      +          },
      +          "url": {
      +            "description": "Paid route of the next call",
      +            "type": "string"
      +          },
      +          "useWhen": {
      +            "description": "When the next call is the right one",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "service",
      +          "tool",
      +          "method",
      +          "url",
      +          "useWhen",
      +          "sample"
      +        ],
      +        "type": "object"
      +      },
      +      "output": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "content": {
      +            "type": "string"
      +          },
      +          "finishReason": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "model": {
      +            "type": "string"
      +          },
      +          "usage": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "completionTokens": {
      +                "maximum": 9007199254740991,
      +                "minimum": -9007199254740991,
      +                "type": "integer"
      +              },
      +              "promptTokens": {
      +                "maximum": 9007199254740991,
      +                "minimum": -9007199254740991,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "promptTokens",
      +              "completionTokens"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "model",
      +          "content",
      +          "finishReason",
      +          "usage"
      +        ],
      +        "type": "object"
      +      },
      +      "pollUrl": {
      +        "type": "string"
      +      },
      +      "status": {
      +        "enum": [
      +          "queued",
      +          "running",
      +          "paused",
      +          "errored",
      +          "terminated",
      +          "complete",
      +          "waiting",
      +          "waitingForPause",
      +          "rollingBack",
      +          "unknown"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "jobId",
      +      "status",
      +      "done",
      +      "pollUrl"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "x402 PaymentRequired (returned with isError when payment is needed)",
      +    "properties": {
      +      "accepts": {
      +        "items": {
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "error": {
      +        "type": "string"
      +      },
      +      "extensions": {
      +        "type": "object"
      +      },
      +      "resource": {
      +        "type": "object"
      +      },
      +      "x402Version": {
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "x402Version",
      +      "accepts"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly, idempotent, openWorld, non-destructive); the description adds the operationally decisive facts an agent needs: pricing per thousand tokens with a per-call cap, the ~8000 ms synchronous latency, the fallback to the status tool, and confirmation that token usage is included in the response.

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-loaded with the use case, then when-not, then cost/latency/return. Dense but each clause carries a distinct operational fact; the pricing parenthetical ('clients without upto pay the cap') is the one piece of jargon that costs a little momentum.

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?

An output schema exists, so return-value explanation is unnecessary, and the description still supplies the latency, cost and polling-escape-hatch context. For a paid, synchronous inference call with a capped budget, that is the complete picture.

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 100%, so roles, token limits, temperature and response_format semantics are already fully documented in the schema; the description adds no format or constraint detail beyond noting that token usage comes back. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb+resource (LLM chat completion) and the intended jobs (summaries, extraction, classification) plus the model behind it (IBM Granite 4.0 Micro on Workers AI). It carves out boundaries against frontier models, tool calling and streaming, though it never contrasts itself with the related siblings blackwood_text_summarize or blackwood_text_sentiment, which overlap on the stated use cases.

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

Usage Guidelines5/5

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

Explicit when-to-use ('summaries, extraction or classification'), explicit when-not ('frontier models, tool calling or streaming'), and it names the alternative path for long-running calls ('a status tool polls for free if it takes longer'). Nothing is left to inference.

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