Skip to main content
Glama

set_setting

Writes a single settings key at one layer using compare-and-set on expected_version, creating it with null or updating it with the stored version, with every outcome audited.

Instructions

Write one settings key at one layer, compare-and-set on expected_version.

expected_version is null to create a record and the stored version to update it. allow_loosen replaces the layer's list of ceiling keys that the layer below may loosen; null keeps the list already stored.

Returns {"ok": True, "scope", "scope_id", "repo", "key", "value", "new_version"} on success, or a refusal dict. Every outcome is audited.

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": {
      "scope": "<scope>",
      "scope_id": "<scope_id>",
      "repo": "<repo>",
      "key": "<key>",
      "value": "<value>",
      "expected_version": "<expected_version>"
    },
    "name": "set_setting"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
repoYes
scopeYes
valueYes
scope_idYes
allow_loosenNo
expected_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

B3.4/5.0
Behavior3/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 well on several fronts: it discloses compare-and-set concurrency control, that partial outcomes are refused via a refusal dict, that every outcome is audited, and the exact success return shape. It does not disclose what authorization or layer constraints apply, or what refusal conditions look like beyond the word "refusal".

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?

Front-loaded with the core action and the compare-and-set rule, then parameter semantics, then return shape. Three short blocks with no filler; the awkward backtick-quoting of parameter names is a minor stylistic cost, not wasted content.

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 7-parameter unannotated mutation tool with no output schema, the description supplies the return shape and audit behavior, which is more than most. Still missing are the scope/layer vocabulary and the conditions under which a refusal occurs, both of which an agent needs before calling this correctly.

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 0% across 7 parameters, so the description must compensate. It explains the two least intuitive parameters well (expected_version's create-vs-update meaning, allow_loosen's replace-vs-keep semantics), but leaves scope, scope_id, repo, key, and value entirely to the bare schema titles — notably what valid scope layers are and how scope_id relates to scope.

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 states a specific verb and resource ("Write one settings key at one layer") plus the concurrency mechanism, which distinguishes it from read-side siblings like get_settings and list_settings. It stops short of naming those siblings explicitly, but the write/compare-and-set framing is unmistakable.

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 guidance is embedded in the semantics of expected_version: null creates, a stored version updates. That tells an agent how to choose between create and update paths, but there is no explicit statement of when to use this tool versus get_settings/list_settings, nor any precondition guidance (e.g., permissions or layer vocabulary).

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