Skip to main content
Glama

Set attribute

set_attribute
Idempotent

Create or change a project attribute value in Casefile, such as repository or main branch, filing an audit entry and requiring a reason when changing an existing value.

Instructions

Sets the value of a project attribute: a reference fact of the project such as its repository or main branch. One call both creates and changes; which entry it files follows from the attribute's state.

  • No attribute with this name, ignoring case: the attribute is created and an attribute_created entry is filed; the reason is optional.

  • An attribute with another value: the value changes and an attribute_changed entry is filed with the previous value; the reason is required.

  • The same value: nothing changes and nothing is filed.

The name keeps the spelling it was created with; another spelling addresses the same attribute and does not rename it. Attributes carry no types and no search: the tracker stores the text and acts on none of it. A task token sets attributes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesProject key, case-insensitive. An unknown key is refused with `project_not_found`
nameYesAttribute name: Latin letters, digits, `_` and `-`, at most 64 characters (`invalid_attribute_name` otherwise). Matching ignores case
valueYesAttribute value: plain text up to 1000 characters, stored as sent and not interpreted by the tracker; a longer one is refused with `attribute_value_too_long`
reasonNoWhy the value changes. Required when the attribute already exists with another value (`attribute_reason_required` otherwise); optional when the call creates it. Filed in the entry with the previous and the new value
idempotency_keyNoRetry key chosen by the caller, e.g. a UUID. A repeat with the same key and the same arguments returns the first result and creates nothing; the same key with other arguments is refused with `idempotency_key_reused`. A key is bound to the caller's token and kept for 24 hours

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noYesNumber of the filed entry in the project's case (`TRK#7`); `null` when the value equals the current one and nothing was filed
nameYesName as stored: the spelling the attribute was created with
valueYes
project_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.2

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false): it discloses case-insensitive matching, that the original spelling is retained and never renamed, that values are stored as plain text with no typing or search semantics, and that the reason becomes required only on a value change. The idempotency and error-code behavior is spelled out in the schema, but the semantic consequences are explained here.

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 operation, then three tight bullets for the branch conditions and one for naming persistence. The trailing fragment 'A `task` token sets attributes.' is terse to the point of ambiguity about authorization context, which slightly blunts an otherwise efficient structure.

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

Completeness5/5

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

With an output schema present and 100% parameter coverage, the description need not describe return values; it instead supplies the mutation semantics, the no-op case, and the reason-required rule. Nothing an agent needs to call this correctly is missing.

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 description coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: it explains the conditional requirement of `reason` in terms of attribute state, and the naming/case behavior that governs `name`. It does not add syntax detail for `idempotency_key` or `key` beyond the schema.

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?

States a specific verb and resource ('Sets the value of a project attribute') and immediately qualifies what an attribute is. It is distinguishable from the sibling remove_attribute and from add_project_entry, and it clarifies that one call both creates and changes.

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 three bulleted branches give precise conditions for when a call creates, changes, or no-ops, which is the core usage decision for this tool. It stops short of naming alternatives (e.g. remove_attribute or add_project_entry) or stating when an agent should prefer a different tool, so it falls just below the top band.

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