knitbrain
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| knitbrain_pingA | Health check — returns pong and the server version. |
| knitbrain_optimizeA | Compress a payload (JSON / code / prose) into a token-cheap skeleton. The exact original is stored locally and recoverable via knitbrain_retrieve using the returned ⟨recall:hash⟩. Returns the original unchanged if compression wouldn't help. |
| knitbrain_retrieveA | Retrieve the exact original bytes for a ⟨recall:hash⟩ handle produced by compression. Use when a skeleton isn't enough and you need the precise content. |
| knitbrain_readA | Read a project file OPTIMIZED: returns a structure-preserving skeleton (signatures/schema kept, bulk elided) + a ⟨recall:hash⟩ to page in the exact original. Use INSTEAD of the host's raw read for large files — same information shape, ~70-90% fewer tokens. Works on every platform. |
| knitbrain_record_learningA | Record a non-obvious project learning (summary + lesson + tags) for future sessions. |
| knitbrain_search_learningsB | Search project learnings; returns ranked headlines (id + summary). Call knitbrain_get_learning for a full lesson. |
| knitbrain_get_learningA | Fetch the full lesson for a learning id (from knitbrain_search_learnings). |
| knitbrain_learning_outcomeA | Close the loop on a recalled learning: report whether it actually HELPED on this task (a concrete outcome, not 'noted'). Useful learnings rise in future recall; ones reported wrong are discredited and sink, and a correction note folds into the lesson so the next recall carries the fix. This is what turns memory from a log into something that compounds. |
| knitbrain_save_handoffC | Save session handoff state so the next session can resume. |
| knitbrain_load_sessionA | Load the prior handoff + top recent learnings to resume work. Resets the context meter for the new session. |
| knitbrain_context_meterA | Token-window meter: how full the context is, tokens saved by optimization, and whether it's time to save a handoff and clear the session. |
| knitbrain_scanA | Scan the project and (re)build the import/export knowledge graph. |
| knitbrain_query_importsC | What a file imports (module specifiers + names). |
| knitbrain_query_exportsC | What a file exports. |
| knitbrain_query_dependentsA | Which files import the given file (blast radius before editing). |
| knitbrain_classify_taskC | Classify a task into a tier (inquiry/trivial/standard/complex) with phases + plan-mode signal. Follow the returned plan. |
| knitbrain_record_false_positiveA | The classifier got it wrong? Record it: claimed tier vs what the task actually was. After 3 same-direction reports the classifier's threshold self-adjusts (per-project, deterministic, bounded). |
| knitbrain_metricsB | Compression telemetry: recall-store tier counts + per-kind retrieval rates (TOIN self-tuning). |
| knitbrain_propose_agentsB | Auto-detect project-specific agent proposals from the knowledge graph (domains + guardrails). Review/edit, then create with knitbrain_create_agent. |
| knitbrain_create_agentB | Generate a project-specific subagent (.claude/agents/.md) with 4 guardrails: file scope, allowed-tools, optional review gate, context budget. |
| knitbrain_runA | THE feedback/orchestrator tool — call FIRST when the user states a task. Classifies it (small→big), finds-or-drafts the SKILL for it, proposes guardrailed agents when multi-domain, lists host slash-commands the agent can run itself, and reports the context meter. Follow the returned directive. |
| knitbrain_compose_skillA | Compose a NEW project-tailored skill for a task in the USER'S OWN composition style (learned from their existing .claude/skills — length, terseness) and persist it. Use when no existing skill fits; refine the body, then knitbrain_skill_save to update. |
| knitbrain_skill_saveC | Persist a refined skill playbook (telegraphic). Same name updates the skill — skills compound across tasks. |
| knitbrain_skill_outcomeA | Close the loop on a skill: report whether it actually WORKED after using it (a test passing, a bug fixed — a concrete outcome, not 'task complete'). Failures with a note fold into the playbook's pitfalls; skills that keep failing get flagged needs-revision instead of being re-served. |
| knitbrain_team_postC | Post a finding to the shared team board (stored compressed; full original recoverable). |
| knitbrain_team_boardA | Read the shared team board — compressed skeletons of every posting (cheap to scan; fetch full with knitbrain_team_get). |
| knitbrain_team_getC | Fetch the full original of a board posting by id. |
| knitbrain_team_clearB | Clear the shared team board (recall originals are retained until tiered out). |
| knitbrain_wiki_ingestA | Ingest a synthesized note into the compounding wiki-brain: writes/updates a terse page, rebuilds the index, appends the log, and stubs any cross-referenced page. Use to compound knowledge across the session (entities, concepts, summaries, session notes) instead of letting it vanish into chat. |
| knitbrain_wiki_queryA | Query the wiki-brain: returns the index catalog + recent log so you can drill into the relevant pages (read them with knitbrain_read). File good answers back with knitbrain_wiki_ingest so explorations compound. |
| knitbrain_wiki_lintA | Health-check the wiki-brain: flags claim contradictions across pages (incl. stale claims superseded over time) and orphan pages nothing links to. |
| knitbrain_verify_claimA | Hard claim-check (anti-hallucination): parse a stated codebase fact and check it against the knowledge graph. Supported shapes: " imports ", " exports ", " is a dependent of " / " depends on ". Returns verified | contradicted | unparseable so a claim is settled by the graph, not by assertion. |
| knitbrain_brain_searchA | Unified brain recall (gap #8): fan a query across ALL typed stores — learnings (BM25), the wiki, and the knowledge graph — and return ranked hits each tagged with the store it came from. One call instead of search_learnings + wiki_query + query_* separately. Drill into a hit with the matching typed tool (knitbrain_get_learning / knitbrain_read / knitbrain_query_*). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/PDgit12/knitbrain'
If you have feedback or need assistance with the MCP directory API, please join our Discord server