Skip to main content
Glama

evaluate_queries

Run accuracy tests for SQL generation by storing question-SQL pairs and scoring generated SQL against ground truth.

Instructions

Build and run an accuracy test suite for SQL generation on a data source. Behavior: action 'add_test' stores a question paired with ground-truth SQL; 'list_tests' shows them; 'remove_test' deletes one; 'run' scores generated SQL against the test cases; 'results' shows the latest run. Usage: use this to measure whether keyword maps and few-shot examples actually improve smart_query accuracy over time; test cases and runs are stored locally per data_source_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform
test_caseNoTest case to add (required when action=add_test)
test_case_idNoTest case ID to remove (required when action=remove_test)
data_source_idYesData source ID
generated_sqlsNoList of SQL to evaluate (required when action=run)
Behavior3/5

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

With no annotations, the description covers actions (add, list, remove, run, results) and notes local storage per data_source_id. However, it omits details like whether 'run' overwrites previous results or requires specific permissions.

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 description is concise: two sentences for purpose and behavior, followed by a usage sentence. Every part earns its place with no wasted words.

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 no output schema, the description only vaguely says list_tests 'shows them' and results 'shows the latest run,' lacking specifics on return format. For a tool with nested objects and multiple actions, this is a notable gap.

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?

The description adds value by mapping each action to its required parameter (e.g., test_case for add_test), supplementing the schema descriptions which already cover semantics. This conditional requirement is not fully captured in the schema alone.

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 explicitly states the tool builds and runs an accuracy test suite for SQL generation, with a clear verb+resource. It is distinct from sibling tools like smart_query or manage_few_shot_examples, which focus on generation or management rather than evaluation.

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?

The description tells when to use it: 'to measure whether keyword maps and few-shot examples actually improve smart_query accuracy over time.' This provides a clear context, though it does not explicitly list alternatives or when not to use it.

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