Skip to main content
Glama

ensure_code_brain_rule

Ensures the mandatory Code Brain rule and bootstrap rule exist in .cursor/rules, recreating them if removed. Call at session start or when rules may be missing; reload Cursor if restored.

Instructions

Ensure the mandatory Code Brain rule and bootstrap rule exist in .cursor/rules. If the rule was removed, this re-creates it. Call at session start or when the rule might be missing. If rules were restored, the response asks the user to reload the Cursor window.

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": "ensure_code_brain_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

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 reasonably well: it discloses that the call mutates .cursor/rules, that it re-creates a deleted rule, and that a restore triggers a user-facing reload prompt in Cursor. It omits whether existing modified rule content is overwritten or preserved, which is the main residual gap for a filesystem-mutating tool.

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?

Three short sentences, front-loaded with what is ensured and followed by trigger and side effect. 'If the rule was removed, this re-creates it' partially restates 'ensure ... exist', a minor redundancy, but it usefully clarifies the restore path.

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?

For a zero-param, no-output-schema, no-annotation utility, the description covers purpose, trigger, mutation behavior, and the post-call user prompt. Only the overwrite/preserve semantics for already-present rules are left unstated.

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?

The tool takes zero parameters and the schema is empty, so there is nothing for the description to disambiguate. Baseline 4 applies; describing 'no arguments required' would be trivially useful but not necessary.

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 specific verb (ensure) and a specific resource (the mandatory Code Brain rule and bootstrap rule inside .cursor/rules), plus the corrective behavior when the artifact is absent. No sibling tool in the list performs anything comparable, so an agent can distinguish it immediately.

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

Usage Guidelines4/5

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

Gives an explicit trigger: 'Call at session start or when the rule might be missing.' That covers the primary and corrective cases. It does not state when-not to call (e.g., that repeated calls are unnecessary / idempotent), but the trigger guidance is clear enough to act on.

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