Skip to main content
Glama

manage_few_shot_examples

Store and manage few-shot examples that pair natural language questions with correct SQL. Use list, add, or remove actions to improve query accuracy by teaching domain conventions.

Instructions

Manage the few-shot examples that smart_query uses to generate more accurate SQL. Behavior: action 'list' returns all stored examples with their ids; 'add' saves a new example (requires the example object); 'remove' deletes one (requires example_id). Each example pairs a natural-language question with the correct SQL and the tables it uses, teaching the model your schema's domain conventions. Usage: examples are stored locally per data_source_id and are retrieved automatically by smart_query — register a few for recurring question patterns to raise accuracy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform
exampleNoExample to add (required when action=add)
example_idNoExample ID to remove (required when action=remove)
data_source_idYesData source ID
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It explicitly describes the behavior for each action: list returns all examples with IDs, add saves a new example, remove deletes one. It also notes local storage per data_source_id. However, it does not mention auth requirements, rate limits, or potential side effects like overwriting.

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?

The description is 4 sentences: purpose, behavior, example structure, usage advice. It is front-loaded with the most important information. Some redundancy exists (example structure mentioned twice implicitly), but overall it is efficient and easy to parse.

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?

Given the tool has 4 parameters with full schema coverage and no output schema, the description explains behavior and usage adequately. However, it does not fully describe the return structure for the 'list' action (only mentions IDs, not full object shape) and does not cover error scenarios (e.g., invalid action or missing parameters). Some gaps remain for an agent to invoke correctly without additional context.

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 baseline is 3. The description adds minimal semantic value beyond the schema—it restates that 'add' requires the example object and 'remove' requires example_id, but the schema already indicates this via conditional requirements and descriptions. No new parameter details are introduced.

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 clearly states the tool manages few-shot examples for smart_query, specifying three distinct actions (list, add, remove). It differentiates from sibling tools like smart_query and manage_keyword_map by focusing on storing training examples, and explains the structure of each example (question, SQL, tables).

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 provides explicit guidance on when to use: 'register a few for recurring question patterns to raise accuracy'. It also describes how examples are stored and retrieved automatically. However, it does not explicitly state when not to use or contrast with alternatives, though the context makes usage clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/seob717/redash-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server