Skip to main content
Glama

get_rules

Retrieve must-follow and task-relevant engineering rules for a coding task before finishing code that touches input, secrets, auth, files, shell, or SQL.

Instructions

Compact applicable engineering rules for a task (must-rules + the most relevant). Honors /.assetrag/rules.json. Call when: before finishing code that touches input, secrets, auth, files, shell or SQL.

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

Input Schema

NameRequiredDescriptionDefault
taskNo
limitNo
languageNo
frameworkNo
project_dirNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations present, the description carries the full burden; it does disclose that output is compact/ranked and that a project-level config file (.assetrag/rules.json) governs results, which is useful behavioral context. It does not state the read-only nature explicitly, nor what happens when no rules match, nor how the config file affects selection.

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 tight sentences: the resource and its composition are stated first, then the invocation trigger. No filler, and the risk-domain list is compact while remaining concrete.

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

Completeness2/5

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

For a five-parameter tool with zero schema coverage, no annotations, and no output schema, the description leaves most of the calling contract undefined — how limit/language/framework filter results, what the response looks like, and what happens on an empty match. It covers the 'what' and 'when' adequately but not the 'how'.

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

Parameters2/5

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

Schema description coverage is 0% across five parameters, so the description must compensate and largely fails: only 'task' is implicitly referenced and 'project_dir' hinted at via the rules.json path. The roles of 'limit', 'language', and 'framework' in shaping results are completely unexplained.

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 names a specific resource and scope: 'compact applicable engineering rules for a task (must-rules + the most relevant).' An agent can tell this retrieves curated rules rather than raw knowledge or lessons, though it never explicitly contrasts itself with siblings like get_knowledge, search_lessons, or promote_failure_to_rule.

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?

The 'Call when:' clause gives concrete triggering conditions tied to risk domains (input, secrets, auth, files, shell, SQL), which is genuinely actionable. It lacks any when-not guidance or named alternative for cases where the agent wants general knowledge or past lessons instead.

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