Skip to main content
Glama

save_kb_card

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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly explains the two modes, parameter behaviors (overwrite updates an existing card), and includes extensive rules about templates, depersonalization, and verification. This exceeds typical transparency expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Though lengthy, the description is well-structured with headings and front-loaded key information (purpose, modes, inputs). The embedded template is a necessary copy-paste instruction, and all sections (rules, template, examples) serve a purpose. Every sentence earns its place.

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 exceptionally complete for a complex tool: it covers two modes, usage triggers, detailed parameter semantics, a full card template, and six explicit rules. An output schema exists, so return values need not be described. This covers all necessary context for correct invocation.

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 coverage is 0%, so the description must compensate. It explains each parameter in context: content (Mode 1 full Markdown), overwrite (Mode 1 set to True to update), kb_id (Mode 2 ID), outcome (Mode 2 'success'/'failure'), and enrichment (Mode 2 optional context on failure). This fully adds meaning beyond the raw schema.

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 with a specific verb ('WRITE to the Knowledge Base') and resource (KB). It distinguishes two distinct modes (save new card vs. report outcome) and is differentiated from siblings like read_kb_doc and resolve_kb_id through explicit 'WRITE' and mode details.

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 'WHEN TO USE' section explicitly provides guidelines for both modes: Mode 1 after fixing a bug when no existing KB card covers it, Mode 2 always after applying a solution from read_kb_doc and running verification. It implicitly contrasts with reading tools, offering clear context and exclusions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.8/5.0
Disambiguation5/5

Each tool has a distinct role in the troubleshooting workflow: resolve_kb_id searches, read_kb_doc retrieves a specific card, and save_kb_card writes or reports outcomes. There is no overlap in their purposes.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: resolve_kb_id, read_kb_doc, save_kb_card. The verbs clearly indicate the action taken on the knowledge base.

Tool Count5/5

Three tools perfectly cover the search-read-write lifecycle of a knowledge base. The count is well-scoped for the server's specific purpose, avoiding unnecessary bloat.

Completeness5/5

The toolset provides complete coverage for the stated workflow: search, read full content, save new cards, and report outcomes. The overwrite option in save_kb_card also supports updates, closing the loop.