Skip to main content
Glama
nlqueries

NLQueries

Official

submit_feedback

Record user feedback on generated SQL queries to improve future accuracy by seeding verified examples.

Instructions

Record user feedback for a query result.

Feedback is stored in ~/.nlqueries/feedback/<agent_id>.jsonl and is used
by ``nlqueries promote-feedback`` to improve future query accuracy by
seeding verified (question, SQL) examples into retrieval.

Args:
    question:      The question that was asked.
    agent_id:      The agent that answered it.
    generated_sql: The SQL that was generated (copy from the query result).
    rating:        ``"up"`` (correct answer) or ``"down"`` (wrong answer).
    corrected_sql: Optional corrected SQL when rating is ``"down"``.

Returns:
    Confirmation string, or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ratingYes
agent_idYes
questionYes
corrected_sqlNo
generated_sqlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description covers file storage location, usage for accuracy improvement, and return value. It could mention side effects like overwriting or permissions, but overall good.

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 well-structured with bullet points, front-loaded with purpose. Every sentence adds value, though slightly lengthy. Could be more concise without losing clarity.

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?

Given no output schema details, the description explains return type and ties the tool into a larger workflow. Could mention error handling or when corrected_sql is required, but adequate overall.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description provides clear meanings for each parameter, including valid values for rating and optionality of corrected_sql, adding significant value beyond the schema.

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 verb 'Record' and the resource 'user feedback for a query result'. It distinguishes from siblings by focusing on feedback, while siblings handle queries, cache, etc.

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 implies when to use (after a query result) and explains the feedback's purpose. It lacks explicit exclusions or comparisons to alternatives, but the context makes it 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/nlqueries/nlqueries'

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