Skip to main content
Glama

save_kb_card

Document bug fixes as structured KB cards and report solution outcomes to build shared knowledge for AI agents.

Instructions

WRITE to the Knowledge Base. This tool has TWO modes:

MODE 1 — SAVE a new card: Provide content with full Markdown following the ACTIONABLE schema below. MODE 2 — REPORT OUTCOME: Provide kb_id + outcome ('success' or 'failure').

WHEN TO USE:

  • Mode 1: After successfully fixing a bug IF no existing KB card covered it.

  • Mode 2: ALWAYS after applying a solution from read_kb_doc and running verification.

INPUT:

  • content: (Mode 1) Full Markdown KB card content — follow the EXACT template below.

  • overwrite: (Mode 1) Set to True to update an existing card.

  • kb_id: (Mode 2) ID of the card to report outcome for.

  • outcome: (Mode 2) 'success' or 'failure'.

  • enrichment: (Mode 2, optional) Additional context to merge into the card when outcome is 'failure'.

━━━ CARD TEMPLATE (Mode 1) — copy this structure EXACTLY ━━━

---
kb_id: "[PLATFORM]_[CATEGORY]_[NUMBER]"   # e.g. WIN_TERM_001, CROSS_DOCKER_002
title: "[Short Title — max 5 words]"
category: "[terminal|devops|supabase|fastmcp|network|database|...]"
platform: "[windows|linux|macos|cross-platform]"
technologies: [tech1, tech2]
complexity: [1-10]
criticality: "[low|medium|high|critical]"
created: "[YYYY-MM-DD]"
tags: [tag1, tag2, tag3]
related_kb: []
---

# [Short Title — max 5 words]

> **TL;DR**: [One sentence — what's the problem + solution]
> **Fix Time**: ~[X min] | **Platform**: [Windows/Linux/macOS/All]

---

## 🔍 This Is Your Problem If:

- [ ] [Symptom 1 — specific symptom or error message]
- [ ] [Symptom 2 — specific error code or log line]
- [ ] [Symptom 3 — environment/version condition]

**Where to Check**: [console / logs / env / task manager / etc.]

---

## ✅ SOLUTION (copy-paste)

### 🎯 Integration Pattern: [Global Scope] / [Inside Init] / [Event Handler]

```[language]
# [One-line comment — what this code does]
[depersonalized code WITHOUT specific paths, use __VAR__ for things to replace]

⚡ Critical (won't work without this):

  • [Critical Point 1] — [why it's essential]

  • [Critical Point 2] — [common mistake to avoid]

📌 Versions:

  • Works: [OS/library versions where confirmed working]

  • Doesn't Work: [OS/library versions where known broken]


✔️ Verification (<30 sec)

[single command to verify the fix worked]

Expected: ✓ [Specific output or behavior that confirms success]

If it didn't work → see Fallback below ⤵


🔄 Fallback (if main solution failed)

Option 1: [approach name]

[command]

When: [condition to use this option] | Risks: [what might break]

Option 2: [alternative approach]

[command]

When: [condition] | Risks: [what might break]


💡 Context (optional)

Root Cause: [1 sentence — why this problem occurs]

Side Effects: [what might change after applying the fix]

Best Practice: [how to avoid this in future — 1 point]

Anti-Pattern: ✗ [what NOT to do — common mistake]


Applicable: [OS, library versions, conditions] Frequency: [rare / common / very common]


━━━ END OF TEMPLATE ━━━

RULES for ACTIONABLE cards:
1. Solution FIRST — after diagnosis, code immediately
2. Depersonalize — no names, project names, or absolute paths
3. Use `__VAR__` markers for anything the user must replace
4. One Verification command, result visible in <30 sec
5. Fallback — 1-2 options max, always include When/Risks
6. Context at End — WHY is optional reading for curious agents

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kb_idNo
contentNo
outcomeNo
overwriteNo
enrichmentNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations exist, so description fully covers behavior: it's a WRITE operation with two modes, overwrite ability, and detailed rules for actionable cards (depersonalization, verification, fallback). Discloses all relevant traits for safe invocation.

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 very long but well-structured with sections, headings, and a template. Front-loaded with purpose and modes. Some redundancy (e.g., lengthy template) could be trimmed, but it's organized for easy scanning.

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?

The description is extremely thorough, covering two modes, all parameters, usage rules, a full template, and output expectation via schema. It compensates for missing annotations and low schema coverage, making the tool fully understandable.

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?

Schema coverage is 0%, but the description explains each parameter's role in context of the two modes (content for Mode 1 with template, overwrite for updates, kb_id and outcome for Mode 2, optional enrichment). However, parameter details are embedded in prose rather than listed, slightly reducing clarity.

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's purpose: 'WRITE to the Knowledge Base' and distinguishes two modes (save new card, report outcome). It contrasts with sibling tools (resolve_kb_id, read_kb_doc) by specifying when to use each mode, thus avoiding confusion.

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?

Explicit when-to-use for each mode: Mode 1 after fixing a bug if no existing card covers it; Mode 2 always after applying a solution from read_kb_doc. Also implies when not to use (e.g., only save if no existing card). This provides clear guidance for the agent.

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/MagneticDogSon/fixflow-mcp'

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