Skip to main content
Glama

generateCompletion

Generates LLM chat completions from prompt messages, with optional JSON response formatting and a dry-run preview to validate requests before sending to Polarion.

Instructions

Generates a chat completion using a Large Language Model (LLM). Effect: triggers a server-side action rather than a plain resource creation — whether repeating it is safe, a no-op, or rejected depends on the specific action; treat it as not guaranteed idempotent. Tip: set dry_run: true first to validate the arguments and preview the exact request without sending it to Polarion. The executor returns this preview as normal text, and as structured content when the tool declares an output schema.

Input Schema

NameRequiredDescriptionDefault
dry_runNoIf true, validates the request and returns the exact request that would be sent to Polarion — with the Authorization header redacted and any binary payload summarized by byte length — without actually sending it.
requestBodyYesGenerate completion parameters.

Output Schema

NameRequiredDescriptionDefault
dataNoThe result of a completion generation request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.3.1
    • changedOutput schema / properties / data / properties / message / properties / content / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / message / properties / role / example
      Removed value: -"user"
    • changedOutput schema / properties / data / properties / message / properties / role / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / message / required
      Removed value: -[
      -  "content",
      -  "role"
      -]
    • changedOutput schema / properties / data / properties / message / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • removedOutput schema / properties / data / required
      Removed value: -[
      -  "message"
      -]
    • changedOutput schema / properties / data / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
  2. Changed1 schema field changedv1.2.0
    • changedInput schema / properties / dry_run / description
      Previous value: -"If true, validate and return the request that would be sent without calling Polarion."New value: +"If true, validates the request and returns the exact request that would be sent to Polarion — with the Authorization header redacted and any binary payload summarized by byte length — without actually sending it."
  3. Changed1 schema field changedv1.1.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Response body for LLM completion generation.",
      +  "properties": {
      +    "data": {
      +      "description": "The result of a completion generation request.",
      +      "properties": {
      +        "message": {
      +          "description": "A message in the LLM completion generation request or response.",
      +          "properties": {
      +            "content": {
      +              "description": "Content of the message.",
      +              "type": "string"
      +            },
      +            "role": {
      +              "description": "Role of the message sender, e.g., 'user' or 'assistant.'",
      +              "example": "user",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "content",
      +            "role"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "message"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  4. Added

TDQS

A3.9/5.0
Behavior4/5

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

Adds real context beyond the annotations: it is a server-side action rather than a resource creation, replay safety is action-dependent, and `dry_run` returns a redacted preview as text and possibly structured content. Much of the idempotency discussion restates idempotentHint=false, and auth or rate-limit requirements go unmentioned, so it is not a 5.

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-loads the purpose, then the side-effect warning, then the dry_run tip. The 'Effect: ... whether repeating it is safe, a no-op, or rejected' hedge is wordy and somewhat boilerplate, but nothing is redundant enough to hurt.

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

Completeness4/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 values need no explanation, and nested request body objects are fully documented. What is missing is whether an LLM must be configured on the Polarion instance or how to discover valid models, which matters given the getLlms sibling.

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 coverage is 100%, so `requestBody`, `messages`, `model`, and `responseFormat` are already documented in the schema. The description only re-explains `dry_run` in prose, with the one genuinely new detail being that the preview comes back as text and structured content. Baseline 3 is appropriate.

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 and resource: 'Generates a chat completion using a Large Language Model (LLM).' That cleanly separates it from read-only siblings like getLlms or getJob. It never names a sibling alternative or clarifies the relationship to getLlms (model discovery), so it falls short of a 5.

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?

Gives an explicit recommended workflow: set `dry_run: true` first to validate arguments and preview the exact request before sending to Polarion. That is concrete, actionable guidance. It stops short of saying when this tool should be used instead of alternatives, and states no exclusions.

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

Deploy Server

Other Tools