Skip to main content
Glama

cfg_add

Creates a new config record by inserting its live document and version 1 in one transaction, refusing duplicate IDs so existing records stay protected.

Instructions

Create a record: insert the live doc and record version 1 in one transaction. Refuses if a live doc with that id exists. A record removed with cfg_rm can be added again.

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": {
      "record": "<record>",
      "doc_json": "<doc_json>",
      "message": "<message>"
    },
    "name": "cfg_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNoEnvironment name from .cfg.toml (e.g. dev, prod). Selects the target database.dev
authorNoAuthor attribution hint. Ignored/rejected in authenticated/enforced identity modes where a verified identity is required.
recordYesRecord address as collection:id, e.g. feature_flags:new_router.
dry_runNoValidate and return the would-be version without writing anything.
messageYesWhy you are creating this record (stored in history).
doc_jsonYesThe new document (object or JSON string). The id field and live_when values are filled in. Dates/decimals as Extended JSON.
config_fileNoOmit: the server uses the .cfg.toml it started with. A different path is refused unless the server runs with CFGIT_MCP_ALLOW_CONFIG_OVERRIDE=1.
no_validateNoSkip the collection validator for an emergency write (recorded in history). Off by default.
allow_secretNoAllow committing values that match secret-deny rules (logged). Off by default.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.5

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose meaningful behavior: single-transaction write of the live doc and version 1, a hard conflict failure on existing ids, and re-add permissibility after removal. It stops short of stating permission or identity prerequisites (the author/identity enforcement noted only in the schema) and says nothing about what an error surfaces.

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?

Three short sentences, no filler, with the core create semantics front-loaded and the failure condition immediately after. Every sentence carries distinct information (what it writes, when it refuses, when reuse is allowed).

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?

An output schema exists and the input schema is fully documented, so return values and parameter details are covered elsewhere. What remains thin for a 9-parameter mutation is surrounding context—whether the target must be on a branch, how identity enforcement interacts with the author field, and what happens on validator rejection.

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?

The schema already documents all nine parameters at 100% coverage, including env selection, dry_run, override refusal for config_file, and the secret/validator escape hatches. The description adds no parameter-level meaning beyond that, which is the expected baseline when structured fields do the work.

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?

States a concrete verb and resource (create a record) and pins down the mechanism: it inserts the live document plus version 1 atomically. The 'refuses if a live doc with that id exists' clause implicitly separates it from update-style siblings like cfg_set, though it never names that alternative outright.

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?

The description establishes the create-only condition (fails on existing id) and one lifecycle note (re-adding after cfg_rm). It does not explicitly say when an agent should pick this over cfg_set, cfg_adopt, or cfg_import, so routing is left to inference from the conflict rule.

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