Skip to main content
Glama
peakacom

peaka-mcp-server

Official
by peakacom

peaka_query_golden_sqls

Read-only

Find existing query/sql pairs in Peaka's golden sql store that match a user's question. Use the retrieved SQL directly; if no match, explore tables and write a new query.

Instructions

Query question/sql pairs from Peaka's golden sql vector store. If you find an existing query matching the user's question, just use it. Otherwise use the other tools to figure out the tables and write the query.

If you do not already know the projectId for the current task, call peaka_list_projects first and ask the user which project to use. Remember the chosen projectId for subsequent calls in this conversation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
projectIdYesThe Peaka project ID to run against.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description is consistent with this. It adds meaningful behavioral context beyond annotations: the golden SQL store is semantic/vector-based retrieval, the found query should be reused verbatim, and projectId is expected to persist across the conversation once chosen. This goes beyond basic safety disclosure.

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?

Three sentences with no redundancy. The core purpose is front-loaded, and each subsequent sentence earns its place by providing workflow guidance and a prerequisite. Nothing could be cut without losing value.

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?

The tool is low-complexity (2 simple params, no output schema, no nested objects), and the description covers purpose, usage flow, and projectId resolution. The only omission is what happens when no matching query is found — whether the tool returns empty results or an error — which matters for agent decision-making since there is no output schema to clarify this.

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?

Schema coverage is only 50% (projectId has a schema description, query does not), so the description carries real weight here. It meaningfully enriches projectId by explaining how to obtain it (via peaka_list_projects) and that the user must confirm the choice. The query parameter's meaning is only implied by the first sentence rather than stated, which is a minor gap.

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 first sentence states a specific verb and resource: 'Query question/sql pairs from Peaka's golden sql vector store.' This clearly differentiates the tool from siblings like peaka_execute_query (execution) and peaka_list_queries (listing) — this one retrieves reusable question/SQL pairs for lookup purposes.

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 provides an explicit decision procedure: use this tool to look for an existing matching query and reuse it if found; otherwise fall back to 'other tools' to derive tables and write a new query. It also specifies the prerequisite of calling peaka_list_projects when projectId is unknown. The only gap is that the alternatives are referred to generically as 'the other tools' rather than named explicitly.

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