Skip to main content
Glama
OpenCDR MCP

OpenCDR MCP

Official
by dbnz-io

opencdr_rules_schema

Read-onlyIdempotent

Retrieves an agent's rule contract, including operators, bounds, and response target keys, so you can build valid detection or correlation rules; pass agent_id for fleet mode.

Instructions

Read this agent's rule contract, operators, bounds and response target keys.

In fleet mode, supply agent_id explicitly. Core mode leaves agent_id unset.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "opencdr_rules_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so safety is covered structurally. The description adds genuinely new behavioral context — that scope is determined by deployment mode (fleet vs core) and that agent_id is mandatory in one and forbidden in the other — but it does not say what happens on a mismatch or what the payload shape looks like.

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?

Two short sentences with the resource definition first and the mode-dependent parameter rule second. No filler, no restatement of the tool name, and it ends as soon as the actionable information is delivered.

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 one optional parameter, no output schema, and rich annotations, the definition covers the essentials: what is returned conceptually and how the single parameter varies by mode. The remaining gap is minor — no note on error behavior when agent_id is supplied in core mode or omitted in fleet mode.

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 description coverage is 0% for the single agent_id parameter, so the description must carry the meaning, and it does: explicit in fleet mode, unset in core mode. That is a meaningful semantic constraint beyond the bare anyOf[string,null] definition. It stops short of saying whether an incorrect mode call errors or is ignored.

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?

The description states a concrete verb ("Read") and a concrete resource ("this agent's rule contract, operators, bounds and response target keys"), which is far more specific than a generic schema-lookup title. It does not, however, contrast itself with near siblings such as opencdr_rules_get or opencdr_rules_list, so an agent must infer that this exposes contract/metadata rather than actual rule data.

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?

Usage guidance exists but only for parameterization: it tells the caller to pass agent_id in fleet mode and leave it unset in core mode. There is no statement of when this tool is the right choice versus opencdr_rules_get, opencdr_rules_list, or opencdr_rules_metrics, so selection between siblings is left to inference.

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