Skip to main content
Glama

get_rules

Retrieves structured uni-app and WeChat mini-program rules by ID, category, or all, including symptoms, causes, and fixes, so assistants can follow relevant constraints before coding.

Instructions

获取规则详情(含症状、成因、修复方案)。传 ids 精确取,或传 category 取整类,都不传取全量。写代码前先按任务场景取对应类规则遵守。

Input Schema

NameRequiredDescriptionDefault
idsNo
categoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does disclose the important default (no args returns the entire rule set) and the shape of returned content, but says nothing about result size, ordering, or whether the full-set call is expensive — a real risk given the unbounded default.

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 short sentences, front-loaded with what is returned, then the three calling modes, then the workflow advice. No filler and nothing buried.

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 2-parameter read tool with no output schema and no annotations, the description covers return contents, both parameters, and the no-argument default. The remaining gap is that valid category values are neither enumerated in the schema nor pointed to via list_categories.

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 0%, so the description must compensate, and it does: ids is defined as precise lookup by identifier and category as whole-class retrieval, including the combination semantics of omitting both. It still doesn't clarify mutual exclusivity of ids vs category or the accepted category values (no enum in schema).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (获取) and resource (规则), and adds that the payload includes 症状、成因、修复方案, which distinguishes it from the sibling list_rules/list_categories by depth of content. It stops short of naming those siblings explicitly, so the differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit selection rules for all three modes: ids for a precise fetch, category for a whole class, neither for the full set. It also supplies a workflow trigger — fetch the matching rule category before writing code — which tells the agent when in a task this tool should fire.

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