Skip to main content
Glama

IA-QA — 152 QA & Dev Tools for AI Agents

few_shot_formatter

Read-onlyIdempotent

Format few-shot examples for LLM prompts. Converts example pairs into formatted blocks. Supports chat format (User/Assistant), XML tags, Markdown, or plain text.

Input Schema

NameRequiredDescriptionDefault
formatNoOutput format (default: chat)
examplesYesArray of {input, output} pairs
input_labelNoLabel for input (default: User / <input>)
output_labelNoLabel for output (default: Assistant / <output>)

Output Schema

NameRequiredDescriptionDefault
formatNo
formattedNo
example_countNo
token_estimateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "examples": [
      +      {
      +        "input": "a",
      +        "output": "b"
      +      },
      +      {
      +        "input": "c",
      +        "output": "d"
      +      }
      +    ]
      +  }
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "example_count": {
      +    "type": "number"
      +  },
      +  "format": {},
      +  "formatted": {},
      +  "token_estimate": {
      +    "type": "number"
      +  }
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.1/5.0
Behavior3/5

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

The tool is inherently a transformation tool, and the annotations confirm it is safe (readOnly, non-destructive). The description does not introduce new behavioral constraints (e.g., token limits or specific failure modes), but it is consistent with the safety profile provided by the annotations.

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 definition is extremely concise. The two sentences are front-loaded and efficient, providing the function and the key features without unnecessary jargon or padding.

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?

Given that the complexity of the tool is low (it is a formatter), the description, combined with the 100% schema coverage and safety annotations, provides a complete mental model for an agent to select and invoke the tool correctly.

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?

While the schema provides the structure, the description provides crucial semantic meaning to the 'format' and 'label' parameters by defining the distinct styles supported (e.g., '(User/Assistant)' for chat mode). This elevates the input understanding beyond simple type definitions.

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 is highly specific, clearly stating the tool's function: 'Format few-shot examples for LLM prompts.' It immediately distinguishes itself by listing the supported outputs (chat, XML, Markdown, plain text), which sets it apart from generic formatting siblings like json_to_yaml.

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

Usage Guidelines3/5

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

The description implies usage for LLM prompting but lacks explicit guidance on *when* this is superior to other prompt-building tools (like prompt_template_fill or build_rag_prompt). It is functionally clear but lacks comparative advice.

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.