Skip to main content
Glama

gnosys_preference_set

Destructive

Save or replace a user preference across projects and return its key, title, and value, enabling agents to persist conventions as user-scoped memories for reuse.

Instructions

Save or replace a user preference across projects, returning its key, title, and value. Use kebab-case keys, e.g. {"key":"code-style","value":"Use named exports"}; title is generated from the key if omitted. Preferences persist as user-scoped memories; the CLI command gnosys sync refreshes generated rules files. Use gnosys_preference_get instead to inspect a key or list preferences.

Input Schema

NameRequiredDescriptionDefault
keyYesPreference key, kebab-case. Examples: 'commit-convention', 'code-style', 'llm-provider', 'testing-approach', 'naming-convention'
tagsNoOptional tags for discovery.
titleNoHuman-readable title. Auto-generated from key if omitted.
valueYesThe preference value. Can be a sentence or paragraph describing the convention.
projectRootNoProject root path; routes the call to that project's store.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv7.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the overwrite risk is partly covered structurally. The description adds real context beyond that: preferences persist as user-scoped memories and generated rules files only refresh via 'gnosys sync'. It could say more about what happens to an existing value when the key is reused, but the operational side effects are disclosed.

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?

Three front-loaded sentences: purpose and return, then the key-format example, then persistence and the get-alternative. Every sentence carries weight, though the kebab-case guidance duplicates the schema slightly.

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?

With no output schema, the description usefully states what is returned (key, title, value) and explains the persistence model and sync requirement. The remaining gap is what 'replace' means for an existing key's tags or title, but nothing essential for a correct call is missing.

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 100%, so the baseline is 3. The description's kebab-case example and the note that 'title is generated from the key if omitted' restate what the schema already documents rather than adding new semantics, so no credit above baseline.

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 a specific verb ('Save or replace') and resource ('user preference'), states the scope ('across projects') and the return shape ('key, title, and value'). It also explicitly distinguishes itself from the sibling gnosys_preference_get, so an agent can choose without opening either schema.

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?

It gives a clear routing rule: use gnosys_preference_get to inspect or list, and this tool to write. The kebab-case convention and the 'gnosys sync' follow-up are practical usage context. It lacks explicit exclusions versus other write-ish siblings such as gnosys_add_structured, which keeps it from a 5.

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