Skip to main content
Glama

set_attribute

Idempotent

Set or update a project attribute, like repository or branch, in Casefile. Changes log the old value and reason; creation logs an optional reason.

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.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses meaningful side effects: filed entries (`attribute_created`, `attribute_changed`), preservation of the previous value, no-op behavior on identical values, and case-insensitive addressing that never renames. It also explains that the tracker stores attributes as inert text and does not interpret or search them, which is valuable behavioral context the annotations do not provide.

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?

The description is front-loaded with the core purpose, then uses a compact bulleted list to lay out the state transitions. Each sentence contributes either to the conceptual model or to operational behavior; there is no filler or unnecessary repetition.

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?

Given the tool's complexity, the description covers every meaningful behavioral case: creation, update, no-op, entry filing, reason requirements, naming semantics, and lack of type/search interpretation. The output schema and rich input schema handle return values and parameter formatting, so nothing essential is missing for correct invocation.

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?

The schema already provides 100% parameter coverage, but the description adds useful semantic nuance: the name keeps its original spelling and a different spelling addresses the same attribute without renaming it. It also reinforces when `reason` is required versus optional, complementing the schema's parameter descriptions.

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?

The description names the exact operation ('Sets the value of a project attribute') and clarifies what kind of attribute is meant ('a reference fact of the project such as its repository or main branch'). It also states the create-or-change duality, making the tool's purpose distinct from sibling tools like remove_attribute.

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 description gives clear usage context by explaining the three possible states (absent, different value, same value) and the resulting behavior. It does not explicitly name alternatives or say 'use this instead of remove_attribute', but the scope and constraints ('Attributes carry no types and no search') provide enough practical guidance for an agent to select it appropriately.

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