Skip to main content
Glama
adambbhe
by adambbhe

sx_build_query

Converts simplified conditions into official qParams arrays without sending requests, enabling pre-validation before executing queries. Returns readable SQL-like descriptions for verification.

Instructions

把简化条件翻译成官方 qParams 数组,不发起请求,用于先验证再查询。

conditions 每项形如 {"key": "billdate", "op": ">=", "value": "2025-01-01"}; 或分组 {"join": "or", "children": [ ...同上... ]}。 返回 qParams 数组与类 SQL 的可读描述。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conditionsYes
Behavior3/5

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

With no annotations, the description carries the full burden. It explicitly states that no request is sent, which is a key behavioral trait. It also mentions the return of a qParams array and a readable SQL-like description. However, it does not disclose details like side effects (though likely none), error handling, or any validation behaviors beyond the implication. The description provides some transparency but is not exhaustive.

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 compact and well-structured. It leads with the core purpose, then details the input format, and finally describes the return value. Every sentence adds value; there is no filler or repetition.

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?

For a tool with one parameter and no output schema, the description is fairly complete. It explains the input format, the transformation, and the return. It lacks examples of output or more detailed operator constraints, but these are minor given the simplicity of the tool. The description provides enough for a competent agent to invoke it correctly.

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 schema provides only 'conditions' as an array with no item schema (coverage 0%). The description compensates by specifying the exact structure of each item: either a simple condition with 'key', 'op', 'value' or a grouped object with 'join' and 'children'. This adds meaningful semantics beyond the schema, though it does not enumerate allowed operators or value types, which would be even more helpful.

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 (translate), the resource (simplified conditions), and the output (official qParams array). It also explicitly notes that it does not make a request, distinguishing it from sibling tools like sx_list_query that execute queries. The purpose is unambiguous and differentiates from alternatives.

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 mentions '用于先验证再查询' (used for validation before querying), which provides clear context on when to use the tool. However, it does not explicitly mention when not to use it or name alternative tools, such as sx_list_query. The usage guidance is present but lacks explicit exclusions.

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/adambbhe/kingdee-sanxiao-MCP'

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