Skip to main content
Glama

manage_architecture_rules

DestructiveIdempotent

Query, update, delete, or reset architectural boundary and layer rules in tzero.rules.json to maintain tier constraints on disk.

Instructions

Manages the complete lifecycle of architectural boundary definitions, tier rules (T-1 to T-4), and layer constraints configured in tzero.rules.json, distinguishing from 'enforce_architecture_rules' and 'generate_architecture_blueprint' by adding, updating, resetting, or deleting boundary definitions on disk rather than validating files or drawing diagrams.

Parameters:

  • action (str, optional, default='query'): Rule lifecycle action: 'query' to inspect active rules, 'update' to add or modify rules, 'delete' to remove a rule, 'reset' to restore defaults.

  • project_root (str, optional, default='.'): Target repository root where tzero.rules.json is located (default: current directory).

  • rule_name (str, optional, default=''): Name or identifier of the rule to update or delete when action is 'update' or 'delete'.

  • rule_definition (str, optional, default=''): JSON string or markdown specification of the rule to set when action is 'update'.

Behavior:

  • State-Modifying / Destructive: Queries existing rules or updates/deletes layer boundary specifications on disk when action is 'update', 'delete', or 'reset'.

  • Idempotent: Repeated queries or sets with identical values produce stable configurations.

  • 100% Offline: Local JSON file management without external communication.

  • Auth & Rate Limits: Zero authentication or cloud credentials required; executes in <20ms.

  • Error Handling: Validates JSON syntax before writing; emits descriptive error messages on malformed rule definitions.

Usage Guidelines:

  • When to use: Retrieve, inspect, add, update, reset, or delete architectural layer constraints (e.g. presentation -> domain -> persistence rules).

  • When NOT to use: Do not use for actively validating codebase files against these rules (use 'enforce_architecture_rules' instead); do not use for generating visual Mermaid architectural topology diagrams (use 'generate_architecture_blueprint' instead).

Returns: JSON or Markdown status report detailing active or updated architectural rules.

Input Schema

NameRequiredDescriptionDefault
actionNoRule lifecycle action: 'query' to inspect active rules, 'update' to add or modify rules, 'delete' to remove a rule, 'reset' to restore defaults.query
rule_nameNoName or identifier of the rule to update or delete when action is 'update' or 'delete'.
project_rootNoTarget repository root where tzero.rules.json is located (default: current directory)..
rule_definitionNoJSON string or markdown specification of the rule to set when action is 'update'.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv7.3.2
  2. Removedv7.0.1
  3. Addedv7.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds valuable context beyond them: state-modifying behavior on disk, which actions are destructive, 100% offline operation, no auth/rate limits, sub-20ms execution, and JSON validation before writing. It discloses what is altered and under which actions.

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 description is structured and front-loaded with purpose, alternatives, parameters, behavior, and return shape. It is somewhat long and repeats schema parameter descriptions, but the information is relevant and organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, the annotations covering safety profile, the fully described schema, and an output schema, the description is complete. It provides enough behavioral and usage context for correct invocation.

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%, so the schema already documents all four parameters. The description repeats the same parameter details with little additional semantics beyond echoing the schema, which meets the baseline for high schema coverage.

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 states a specific verb and resource: it manages the lifecycle of architectural boundary definitions, tier rules, and layer constraints in tzero.rules.json. It explicitly distinguishes itself from 'enforce_architecture_rules' and 'generate_architecture_blueprint' by describing its disk-mutating role versus validation and diagram generation.

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?

It gives explicit 'When to use' and 'When NOT to use' guidance, naming alternatives and the conditions that select them. The agent does not need to infer whether to choose this tool or a sibling.

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