Skip to main content
Glama

add_decision

Record a key decision when the user explicitly chooses an option, capturing the question, choice, and reasoning to persist decisions across tools.

Instructions

记录单条关键决策(用户明确选了某个方案)。 / Record one key decision when the user explicitly chose an option.

**Lifecycle: writeback** — 对话中做出明确决策时调用。
Lifecycle: writeback — call when an explicit decision is made during conversation.

用途:用户说"我们决定用 X"或"以后都用 Y"时调用。
Purpose: Call when the user says they decided to use X or will use Y going forward.

注意:如果用户给了一段会话摘要让你自动提取,请用 extract_session_insights 而不是本工具。
Note: If the user gives a session summary for automatic extraction, use extract_session_insights instead.

决策链(Decision Thread):同一问题改选方案时,会自动在决策链中标记旧决策为 superseded。
也可显式传 supersedes 参数指定被取代的旧决策 ID。
Decision thread: when the same question gets a different choice, the old decision is
automatically marked superseded. You may also explicitly pass supersedes with the old ID.

Args:
    question: 决策的问题,如"数据库选型"。 / Decision question, such as 'database choice'.
    choice: 做出的选择,如"PostgreSQL"。 / Chosen option, such as 'PostgreSQL'.
    reasoning: 选择的理由(可选)。 / Reasoning for the choice (optional).
    source_tool: 记录来源工具,如 'claude_code', 'codex'(可选,建议填写)。 / Source tool, such as 'claude_code' or 'codex' (optional but recommended).
    project: 关联项目(可选)。 / Related project (optional).
    domain: 技术领域(可选),可填多个,逗号分隔,如 'architecture,database'。 / Technical domain (optional); may contain multiple comma-separated labels such as 'architecture,database'.
    supersedes: 被本决策取代的旧决策 ID(可选)。填写后自动在决策链中建立 supersedes 关系。 / ID of the old decision this one replaces (optional). Creates a supersedes edge in the decision thread.
    source_agent: 产生/校验此决策的 agent 身份(可选)。 / Agent identity that produced or validated this decision (optional).
    run_id: 产生此决策的工作流/会话运行 ID(可选)。 / Workflow/session run id that produced this decision (optional).
    last_validated_at: 最近确认此决策仍然成立的 ISO-8601 时间(可选)。 / ISO-8601 time this decision was last confirmed to still hold (optional).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionYes
choiceYes
reasoningNo
source_toolNo
projectNo
domainNo
supersedesNo
source_agentNo
run_idNo
last_validated_atNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description discloses that the tool writes back data (mutating) and automatically marks old decisions as superseded in the decision thread. It explains the supersedes parameter and the automatic behavior. However, it does not mention idempotency or duplicates, which would improve transparency.

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?

The description is well-structured with sections and uses bilingual text effectively. Every sentence adds value, though the bilingual repetition increases length. It could be slightly more concise but remains clear and organized.

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 10 parameters (2 required) and an output schema, the description covers all parameters, usage context, lifecycle, decision thread behavior, and alternative tool usage. It provides sufficient information for an agent to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Since the input schema has 0% description coverage (only titles and types), the description fully compensates by explaining each parameter's meaning, purpose, and optionality, with examples for key ones like 'question', 'choice', and 'domain'.

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 it records a key decision when an explicit choice is made. It specifies the verb 'record', the resource 'key decision', and distinguishes from the sibling tool 'extract_session_insights' by noting when not to use it.

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?

The description provides explicit when-to-use scenarios (user says 'we decided X') and a when-not-to-use alternative (use extract_session_insights for session summaries). It also mentions the lifecycle 'writeback', giving clear context.

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/Patdolitse/piia-engram'

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