Skip to main content
Glama
zhouweico

mcp-yearning

by zhouweico

yearning_run_query

Read-onlyIdempotent

Execute read-only SELECT queries on Yearning-audited data sources, returning result tables with configurable row limits and markdown/json response formats.

Instructions

在指定数据源执行只读 SELECT 查询并返回结果表格。

注意:本工具仅执行 SELECT,对目标库数据无修改;但 Yearning 会留存查询审计记录, 且查询本身可能产生资源开销(如全表扫描、锁竞争),属「提交操作」而非纯被动读取。 需具备查询权限且已通过查询审核。

对应 API:WS /api/v2/query/results(msgpack 编解码)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes查询 SQL(仅 SELECT,不修改目标库数据)
limitNo返回行数上限(客户端截断)
schemaYes库名
source_idYes数据源 ID
response_formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond annotations (readOnlyHint=true, destructiveHint=false), the description adds significant behavioral context: it only executes SELECT with no data modification, but it retains audit records and may cause resource overhead like full-table scans and lock contention, making it a 'submit operation' rather than a purely passive read. This enriches the annotation info without contradicting it.

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 main purpose is stated in a single, focused sentence. The additional note and API reference are structured and useful, though the API endpoint detail is slightly beyond core usage guidance. Overall, it is concise and well-organized.

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 description covers purpose, constraints, permissions, and side effects. The output schema handles return format details, so missing return value descriptions are not a gap. It could be slightly more complete by mentioning error scenarios, but it is adequate for a query execution tool.

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 80%, so parameters are already well-documented. The description reinforces that SQL is read-only, but does not add new parameter-level details beyond what the schema provides. Baseline 3 is appropriate.

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 it executes a read-only SELECT query and returns a result table. It uses specific verb+resource (execute query on specified data source) and distinguishes from sibling tools like sql_check and audit_orders, which serve different 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 clear context: it requires query permissions and must pass query review, and it explicitly notes this is a 'submit operation' with audit and resource overhead. It does not explicitly list alternative tools, but it gives enough context for an agent to understand when this tool is applicable.

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/zhouweico/mcp-yearning'

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