Skip to main content
Glama

add_to_global

Adds a cross-project rule or fact to a shared AGENTS.md or memory document, with team or personal scope, after confirming it applies beyond the current project.

Instructions

Add one line to a doc every project shares: doc is agents (the AGENTS.md for all projects: a rule every session should follow, e.g. "always build on a branch, never commit to main") or memory (a fact or preference that holds across projects, e.g. "the household uses euros"). Ask the user first, and add only what holds beyond this project; a project's own rules go in its own AGENTS.md. A line already there is not added twice. scope is team (the default: the docs every person shares) or personal (the caller's own AGENTS.md or memory, read only by them: a preference of theirs that is not the team's).

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": {
      "doc": "<doc>",
      "line": "<line>"
    },
    "name": "add_to_global"
  }
}

Input Schema

NameRequiredDescriptionDefault
docYes
lineYes
scopeNoteam

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.57.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses idempotency ('A line already there is not added twice'), a mandatory user-confirmation step before writing, and the readership difference between team and personal docs. What it omits is failure behavior (does a duplicate cause an error or a silent no-op) and any permission or rate constraints; the return shape is covered by the output schema, so that gap is minor.

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?

The action and resource are front-loaded, then the two `doc` values and the two `scope` values are unpacked in reading order. It is a single dense sentence with heavy parentheticals that is slightly run-on, but essentially every clause conveys a routing or behavioral fact.

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 three-parameter mutation tool with no annotations, the definition covers intent, target selection, scope selection, duplicate handling, and the ask-the-user prerequisite, while the output schema handles return values. The only meaningful omission is error/permission behavior on a failed or rejected write.

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 coverage is 0% with no enums declared, so the description must define the parameter domains, and it does: `doc` is either agents or memory with examples, and `scope` is team (default) or personal with the readership implication spelled out. `line` is only loosely constrained ('one line', singular) without stating whether newlines or formatting are allowed, which keeps it short of a 5.

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?

Uses a specific verb and resource ('Add one line to a doc every project shares') and then enumerates the two possible `doc` targets, agents and memory, with a concrete example of each. An agent can distinguish this from read_global_docs and from project-local AGENTS.md writes without consulting the schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use criteria ('add only what holds beyond this project'), an explicit when-not-to ('a project's own rules go in its own AGENTS.md'), a required procedural step ('Ask the user first'), and a routing rule between team and personal scope. That is nearly the full decision surface an agent needs.

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