Skip to main content
Glama
huaqing0
by huaqing0

clash.rules.inspect

Inspect rules from profile, merge, rules layer, or runtime source. Returns ruleset fingerprint, paginated rules with per-rule fingerprints, and MATCH position.

Instructions

Inspect rules from profile, merge, rules layer, or runtime source. Returns ruleset fingerprint, paginated rules with per-rule fingerprints, and MATCH position. Read-only. source="rules" inspects the active profile's independent rules layer (Verge prepend/append/delete enhancement template); use "section" to select which part. For runtime rules use clash.config.get_effective with section="rules".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoPage size, capped at 200 (default 50)
cursorNoOpaque next cursor from previous response
sourceNoRule source (default: profile). "rules" inspects the active profile's independent rules layer file.
sectionNoWhen source="rules", which section to show (default: prepend)
targetProfileUidNoTarget Profile UID. Defaults to active Profile; supports inspecting an inactive Profile without switching it.
Behavior4/5

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

Declares read-only nature and describes return values: 'ruleset fingerprint, paginated rules with per-rule fingerprints, and MATCH position'. No annotation coverage, but description adequately covers behavioral traits.

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?

Four concise sentences with no redundancy. Front-loaded with purpose, then key details, then alternative tool reference.

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?

Covers purpose, read-only, pagination, source options, section behavior, and alternative tool. Lacks exact return format details but mentions key return elements. Adequate given no output schema.

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?

Adds context beyond schema for 'source' (explains 'rules' source and Verge template), 'section' (which parts), and 'targetProfileUid' (defaults to active, supports inactive). Schema coverage is 100%, but description enhances understanding.

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?

Description clearly states the verb 'inspect' and the resource 'rules' from multiple sources (profile, merge, rules, runtime). It distinguishes from sibling tools like clash.config.get_effective for runtime rules.

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?

Explicitly provides when to use alternative: 'For runtime rules use clash.config.get_effective with section="rules"'. Also explains source='rules' behavior and section parameter usage.

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/huaqing0/clash-control-mcp'

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