Skip to main content
Glama

save_user_rule

Saves a behavioral rule you established so the agent follows it consistently. Store actionable instructions by scope—global, workspace, or repo—for repeatable preferences.

Instructions

Saves a behavioral rule the user established. Key should be descriptive (e.g. 'test_style'). Instruction must be actionable as a standalone rule. Scope: global (all repos), workspace, or repo.

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": {
      "key": "<key>",
      "instruction": "<instruction>",
      "scope": "<scope>"
    },
    "name": "save_user_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesDescriptive preference key (e.g. 'test_style', 'commit_format')
scopeYesScope level: 'global', 'workspace', or 'repo'
scope_idNoTarget ID: repo ID or workspace ID. Required for workspace/repo scope, ignored for global.
instructionYesActionable instruction for the agent

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.2

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It establishes that a rule is persisted but says nothing about overwrite/upsert semantics for duplicate keys, whether scope_id mismatches error out, permission requirements, or what the call returns on success or failure.

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 the purpose, then parameter guidance, then scope semantics. Little waste, though the key/instruction guidance slightly repeats schema text and the scope clause is a fragment tacked on at the end.

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?

For a 4-parameter mutation tool with no annotations and no output schema, the description covers the required inputs adequately but leaves gaps on duplicate-key behavior, error conditions, and return shape. It is viable but not complete for an agent writing rules it may later need to update or delete.

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 baseline is 3. The description does add a little meaning beyond the schema — 'global (all repos)' clarifies the enum, and 'actionable as a standalone rule' gives qualitative guidance on instruction content — but key and scope examples largely duplicate what the schema already documents.

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 gives a specific verb and resource: 'Saves a behavioral rule the user established.' An agent can distinguish this from delete_user_rule and load_user_rules by the verb alone, but the text never explicitly contrasts those siblings or states that this creates/persists rather than reads or removes.

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 is only implied: the phrase 'a behavioral rule the user established' suggests this is called after the user expresses a durable preference, but there is no explicit when-to-use, when-not-to-use, or alternative routing. It also does not say what happens when a rule with an existing key is saved, which is the most likely caller confusion.

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