Skip to main content
Glama

add_decision

Record explicit decisions made in conversation. Capture the question, chosen option, and reasoning. Automatically supersedes previous decisions on the same question.

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
choiceYes
domainNo
run_idNo
projectNo
questionYes
reasoningNo
supersedesNo
source_toolNo
source_agentNo
project_folderNo
user_confirmedNo
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 provided, the description carries full burden. It discloses that old decisions are automatically superseded when the same question gets a different choice, and allows explicit supersedes. It also mentions lifecycle: writeback. However, it does not discuss any side effects, authorization, or persistence, though these may be implicit.

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 headers and bullet points, but it is somewhat verbose, repeating lifecycle information and using two languages. Every sentence adds value, but it could be slightly more concise without losing clarity.

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 12 parameters (2 required), no enums, no nested objects, and an output schema exists, the description thoroughly explains each parameter, the decision thread, and usage context. It is complete and leaves no significant gaps.

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?

Schema description coverage is 0%, so the description must compensate. It provides a thorough 'Args' section documenting all 12 parameters with clear explanations in both Chinese and English, including defaults and optionality.

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 records a key decision when the user explicitly chooses an option, with examples like 'we decided to use X'. It distinguishes the tool from extract_session_insights and explains the decision thread behavior, providing a specific verb ('record') and resource ('key 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?

The description explicitly says when to call: when the user explicitly makes a decision. It also provides a clear exclusion: if the user gives a session summary for automatic extraction, use extract_session_insights instead.

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