Skip to main content
Glama

record_user_preference

Store user preferences and query corrections to persistently adapt responses. Correct misinterpretations and apply repeated preferences across sessions.

Instructions

Store an explicit user preference or query-rewrite correction.

Standard preferences (preference_key = any label): Store as: record_user_preference("response_format", "code-first, then explanation") Surfaced via get_user_profile()['explicit_preferences'].

Query-rewrite corrections (preference_key = "query_rewrite"): Use when you asked for X but user says they actually meant Y. Store the wrong phrasing as preference_value, intent in context: record_user_preference("query_rewrite", "deploy model", context="user means: update the ML model weights in production, not software deploy") Stored in query_rewrites list; agents apply these before retrieval so future similar queries hit the right code even when phrasing is off.

Claude: call this when:

  • User corrects your interpretation ("no, I meant X not Y")

  • User expresses a repeated preference ("always show code first")

  • User clarifies what a query actually means in this codebase

Do NOT call for one-off answers — only for durable preferences that should persist across sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
preference_keyYes
preference_valueYes
contextNo
repo_pathNo
Behavior5/5

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

Despite no annotations, the description fully explains the effect: stored preferences appear in get_user_profile() and query_rewrites affect future retrieval. It describes the persistence and impact, making the behavior transparent.

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?

Well-structured with clear sections and front-loaded purpose. Each sentence adds value, but the description is somewhat lengthy. Could be slightly tighter without losing clarity.

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?

Covers main use cases and parameter roles, but omits repo_path purpose and return value. Given no output schema, the description is mostly sufficient for a store tool, but a small gap remains.

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?

With 0% schema coverage, the description adds substantial meaning: explains preference_key (standard vs query_rewrite), preference_value (preference or wrong phrasing), and context (intent). However, repo_path is not explained, leaving a gap.

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 clearly states the tool stores explicit user preferences or query-rewrite corrections. It gives specific examples and distinguishes between two use cases. The purpose is distinct from sibling tools like store_memory or record_decision.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly lists when to call (user correction, repeated preference, clarification) and when not to call (one-off answers). Provides clear guidance on durable preferences, effectively guiding the agent's decision.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ashlesh-t/cognirepo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server