context-doctor 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/mcp.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@ Every long-running LLM conversation slowly fills up with junk: duplicated docume
|
|
|
6
6
|
|
|
7
7
|
`context-doctor` is a zero-config profiler + optimizer for LLM contexts. It works with **Claude, GPT, Gemini** message formats, and plugs into **Claude Desktop, ChatGPT (developer mode), Cursor, Claude Code** — any MCP-capable app — or runs standalone from the terminal.
|
|
8
8
|
|
|
9
|
+
Built and maintained by [gAI Ventures](https://gai.ventures).
|
|
10
|
+
|
|
9
11
|
```
|
|
10
12
|
Where the tokens go
|
|
11
13
|
────────────────────────────────────────────────────────
|
|
@@ -274,4 +276,4 @@ Also keep the MCP server version in `src/mcp.ts` in sync with `package.json`, an
|
|
|
274
276
|
|
|
275
277
|
## License
|
|
276
278
|
|
|
277
|
-
MIT
|
|
279
|
+
MIT © [gAI Ventures](https://gai.ventures)
|
package/dist/mcp.js
CHANGED
|
@@ -31,7 +31,7 @@ const SERVER_INSTRUCTIONS = `context-doctor keeps this conversation's context wi
|
|
|
31
31
|
2. When the conversation has grown long (roughly 30+ turns) or contains several large pastes, proactively offer to profile it and call profile_context — do not wait to be asked.
|
|
32
32
|
3. When the user asks anything about token usage, cost, latency, or "what's eating my context", call profile_context immediately rather than estimating by eye.
|
|
33
33
|
4. When optimize_context returns a pruned-turns digest, YOU write the replacement summary (dense, factual, ≤150 tokens) as instructed in the result.`;
|
|
34
|
-
const server = new McpServer({ name: "context-doctor", version: "0.3.
|
|
34
|
+
const server = new McpServer({ name: "context-doctor", version: "0.3.4" }, { instructions: SERVER_INSTRUCTIONS });
|
|
35
35
|
const STRATEGY_IDS = ["dedupe", "trim-tool-results", "strip-base64", "prune-history"];
|
|
36
36
|
server.tool("profile_context", "Profile an LLM conversation or prompt: token breakdown by category, largest messages, and actionable findings about wasted context (duplicates, oversized tool results, base64 blobs, cache-unfriendly ordering). Accepts OpenAI/Anthropic conversation JSON or raw text. Call this immediately whenever the user asks about token usage, context size, LLM cost, or latency — and proactively offer it once a conversation grows long or accumulates large pasted content.", {
|
|
37
37
|
conversation: z.string().describe("Conversation JSON (OpenAI or Anthropic format, or bare message array) or raw prompt text"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-doctor",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Profile and optimize LLM context windows. See what's eating your tokens and fix it — works with Claude, GPT, Gemini, and any MCP-capable AI app.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"llm",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"prompt-caching"
|
|
16
16
|
],
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
"author": "
|
|
18
|
+
"author": "gAI Ventures (https://gai.ventures)",
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "git+https://github.com/KushalP1/context-doctor.git"
|