Skip to main content
Glama
grandMA2 MCP
by drohi-r

register_decomposition_rule

Registers a runtime regex-based rule that maps natural-language goals to structured agent steps with roles, risk levels, tools, dependencies, and evaluation criteria.

Instructions

    Register a new task decomposition rule at runtime (admin only).

    Args:
        pattern:    Regex pattern matched against natural-language goals
        steps_json: JSON array of step dicts with keys:
                    name, agent_role, description,
                    allowed_risk (SAFE_READ|SAFE_WRITE|DESTRUCTIVE),
                    mcp_tools (array), depends_on (array), eval_criteria
    

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pattern": "<pattern>",
      "steps_json": "<steps_json>"
    },
    "name": "register_decomposition_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
patternYes
steps_jsonYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It discloses the admin-only restriction and that this is a runtime registration, which is genuinely useful. But it is silent on persistence (does it survive restart?), conflict/override behavior when the regex matches an existing rule, validation failure modes, and whether the action is reversible — meaningful gaps for a write operation.

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?

Front-loaded with the core action and permission condition, followed by a compact arg list. Docstring-style 'Args:' formatting is slightly verbose but every line carries substantive parameter information; no filler sentences.

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

Completeness3/5

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

An output schema exists, so return values need not be explained. For a two-parameter mutation tool with zero annotation coverage and an opaque string-typed nested payload, the definition covers the inputs well but omits behavior on conflicts, validation errors, and effect lifetime — gaps an agent would want before invoking it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the schema types steps_json only as a plain string, so the description is the sole source of meaning. It defines pattern as a regex matched against natural-language goals, and enumerates every required step-dict key (name, agent_role, description, allowed_risk, mcp_tools, depends_on, eval_criteria) plus the allowed_risk enum values. Nothing essential about the parameters is left undocumented.

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: 'Register a new task decomposition rule at runtime'. An agent knows exactly what is created. It does not differentiate itself from any sibling (e.g., whether existing rules can be listed or removed elsewhere), so it stops short of a 5.

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

Usage Guidelines3/5

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

The parenthetical '(admin only)' gives a useful permission precondition and 'at runtime' implies the rule takes effect without a restart. However, there is no when-to-use vs when-not guidance, no mention of how this relates to any lookup/removal tool, and no statement about what happens if the pattern collides with an existing rule.

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