Skip to main content
Glama

ruleset_export

Export the audit ruleset as standardized, reloadable JSON with rule metadata, version, and HMAC fingerprint for third-party use, and log the export for audit trails.

Instructions

规则集导出——25 条默认规则 + 已加载扩展规则导出为标准 JSON(与 --ruleset-path 加载格式同构,导出即加载格式、双向可逆),每条附训练消费元数据(rule_id / 检测意图 / 违规样例 / 严重级别)+ 规则集版本号 + 内容指纹(HMAC-SHA256),导出行为写审计留痕。边界:list_rules 只列规则清单、corpus_export 导出训练语料三件套——本 tool 导出「规则面标准 JSON」供第三方零转换消费。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dryRunNo只构造不落盘、不留痕(预览用)
outDirNo导出 JSON 落盘目录(缺省 <dataDir>/export/ruleset)
dataDirNo数据根目录(审计留痕落点,缺省 SOFAGENT_DATA / data)
descriptionNo规则集描述(缺省自动生成)
rulesetNameNo规则集名称(缺省 sofagent)
rulesetVersionNo规则集版本(缺省读 audit 包 package.json 版本)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.2

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations the description carries the full burden and does so well: it discloses that export writes an audit trail, embeds a HMAC-SHA256 content fingerprint, and that the export format is isomorphic to and bidirectionally reversible with the --ruleset-path load format. It stops short of stating permissions/authorization or overwrite behavior, so not a perfect 5.

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?

A single dense paragraph, front-loaded with the core purpose before the metadata details and the boundary clause. Information-dense but every clause (format reversibility, fingerprint, audit, boundaries) is load-bearing; only the heavy parenthetical stacking slightly hinders scanning.

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?

With no output schema, the description compensates by specifying what the exported JSON contains (per-rule metadata, version, fingerprint) and the audit side effect. For a parameterless-required export tool it is nearly complete; only explicit permission/overwrite semantics are missing.

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 100% and every parameter (dryRun, outDir, dataDir, description, rulesetName, rulesetVersion) is documented in-schema with defaults, so the baseline is 3. The description adds context about output content but no per-parameter semantics beyond what the schema already provides.

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?

States a precise verb+resource (导出规则集为标准 JSON) and enumerates exactly what the output contains: 25 default + loaded extension rules, per-rule training metadata, version, HMAC-SHA256 fingerprint. It also explicitly names the siblings it is not (list_rules, corpus_export), so an agent can distinguish it without opening other schemas.

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?

The 边界 sentence gives explicit routing: list_rules only enumerates the rule inventory, corpus_export handles the training-corpus trio, and this tool produces the rule-face standard JSON for third-party zero-conversion consumption. When-to-use and when-to-use-alternatives are both stated.

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

Deploy Server

Other Tools