claude-mcp-bridge 0.1.0 → 0.3.0
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 +71 -5
- package/dist/annotations.d.ts +24 -0
- package/dist/annotations.d.ts.map +1 -0
- package/dist/annotations.js +53 -0
- package/dist/annotations.js.map +1 -0
- package/dist/descriptions.d.ts +15 -0
- package/dist/descriptions.d.ts.map +1 -0
- package/dist/descriptions.js +56 -0
- package/dist/descriptions.js.map +1 -0
- package/dist/index.js +253 -144
- package/dist/index.js.map +1 -1
- package/dist/tools/ping.d.ts +2 -1
- package/dist/tools/ping.d.ts.map +1 -1
- package/dist/tools/ping.js +28 -5
- package/dist/tools/ping.js.map +1 -1
- package/dist/utils/meta.d.ts +18 -0
- package/dist/utils/meta.d.ts.map +1 -0
- package/dist/utils/meta.js +29 -0
- package/dist/utils/meta.js.map +1 -0
- package/dist/utils/progress.d.ts +37 -0
- package/dist/utils/progress.d.ts.map +1 -0
- package/dist/utils/progress.js +49 -0
- package/dist/utils/progress.js.map +1 -0
- package/dist/utils/session.d.ts +58 -0
- package/dist/utils/session.d.ts.map +1 -0
- package/dist/utils/session.js +98 -0
- package/dist/utils/session.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,7 +44,9 @@ claude -p --bare --max-budget-usd 0.50 "Is this retry logic sound?"
|
|
|
44
44
|
|
|
45
45
|
- Node.js >= 18
|
|
46
46
|
- [Claude Code CLI](https://github.com/anthropics/claude-code) installed and on PATH
|
|
47
|
-
-
|
|
47
|
+
- Authentication (one of):
|
|
48
|
+
- **Subscription**: `claude login` (uses your Pro/Max plan, no API credits needed)
|
|
49
|
+
- **API key**: set `ANTHROPIC_API_KEY` (billed per use via console.anthropic.com)
|
|
48
50
|
|
|
49
51
|
### From source
|
|
50
52
|
|
|
@@ -201,25 +203,58 @@ Web search via Claude Code CLI using WebSearch and WebFetch tools.
|
|
|
201
203
|
| `maxBudgetUsd` | number | | Cost cap in USD |
|
|
202
204
|
| `effort` | string | `medium` | `low`, `medium`, `high`, or `max` |
|
|
203
205
|
|
|
206
|
+
### `listSessions`
|
|
207
|
+
|
|
208
|
+
List active Claude CLI sessions tracked by this server. Returns session metadata for orchestration.
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
[
|
|
212
|
+
{
|
|
213
|
+
"sessionId": "abc-123",
|
|
214
|
+
"model": "sonnet",
|
|
215
|
+
"createdAt": 1712700000000,
|
|
216
|
+
"lastUsedAt": 1712703600000,
|
|
217
|
+
"turnCount": 5,
|
|
218
|
+
"totalCostUsd": 0.23
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
No parameters. Sessions are stored in-memory (TTL 24h, LRU eviction at 100). Use to check available sessions before resuming with `sessionId`.
|
|
224
|
+
|
|
204
225
|
### `ping`
|
|
205
226
|
|
|
206
227
|
Health check. No parameters. Returns CLI availability, auth status, configured models, server version, and capability flags.
|
|
207
228
|
|
|
208
229
|
```
|
|
209
230
|
cliFound: true
|
|
210
|
-
version: 1.
|
|
211
|
-
|
|
231
|
+
version: 2.1.92 (Claude Code)
|
|
232
|
+
authMethod: subscription
|
|
233
|
+
subscriptionType: max
|
|
212
234
|
defaultModel: sonnet
|
|
213
235
|
fallbackModel: haiku
|
|
214
236
|
serverVersion: 0.1.0
|
|
215
|
-
nodeVersion: v22.
|
|
237
|
+
nodeVersion: v22.22.0
|
|
216
238
|
maxConcurrent: 3
|
|
217
239
|
capabilities: bareMode=true, jsonOutput=true, jsonSchema=true, sessionResume=true
|
|
218
240
|
```
|
|
219
241
|
|
|
242
|
+
`authMethod` is one of: `api-key` (ANTHROPIC_API_KEY set), `subscription` (logged in via `claude login`), or `none`.
|
|
243
|
+
|
|
220
244
|
## Configuration
|
|
221
245
|
|
|
222
|
-
All configuration is through environment variables. None are required if Claude CLI is on PATH and
|
|
246
|
+
All configuration is through environment variables. None are required if Claude CLI is on PATH and you're authenticated (via `claude login` or `ANTHROPIC_API_KEY`).
|
|
247
|
+
|
|
248
|
+
### Authentication
|
|
249
|
+
|
|
250
|
+
The bridge supports two auth methods, matching Claude Code CLI:
|
|
251
|
+
|
|
252
|
+
| Method | Setup | Billing |
|
|
253
|
+
|--------|-------|---------|
|
|
254
|
+
| **Subscription** | `claude login` (OAuth) | Pro/Max plan (included) |
|
|
255
|
+
| **API key** | Set `ANTHROPIC_API_KEY` | Pay-per-use (console.anthropic.com) |
|
|
256
|
+
|
|
257
|
+
If `ANTHROPIC_API_KEY` is set, it takes priority over subscription auth. To use your subscription instead, unset the API key.
|
|
223
258
|
|
|
224
259
|
### Models
|
|
225
260
|
|
|
@@ -280,6 +315,37 @@ CLI output is scanned for sensitive patterns before being returned: Anthropic AP
|
|
|
280
315
|
| Hard timeout cap | 10 minutes |
|
|
281
316
|
| Concurrency queue timeout | 30 seconds |
|
|
282
317
|
|
|
318
|
+
## Response metadata
|
|
319
|
+
|
|
320
|
+
Every tool response includes a `_meta` object with execution metadata:
|
|
321
|
+
|
|
322
|
+
| Field | Type | Description |
|
|
323
|
+
|-------|------|-------------|
|
|
324
|
+
| `durationMs` | number | Wall-clock execution time |
|
|
325
|
+
| `model` | string? | Model used (e.g. "sonnet", "opus") |
|
|
326
|
+
| `sessionId` | string? | Session ID for resume |
|
|
327
|
+
| `totalCostUsd` | number? | Cost for this call in USD |
|
|
328
|
+
| `inputTokens` | number? | Input tokens consumed |
|
|
329
|
+
| `outputTokens` | number? | Output tokens generated |
|
|
330
|
+
| `cacheReadTokens` | number? | Tokens read from prompt cache |
|
|
331
|
+
| `timedOut` | boolean? | `true` if subprocess exceeded timeout (omitted otherwise) |
|
|
332
|
+
|
|
333
|
+
All tools also declare [MCP annotations](https://modelcontextprotocol.io/specification/2025-06-18/server/tools#annotations) (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`) so clients can make informed permission and safety decisions.
|
|
334
|
+
|
|
335
|
+
## Sessions
|
|
336
|
+
|
|
337
|
+
Session state is tracked in-memory across calls. When a tool returns a `sessionId` in `_meta`, pass it back on subsequent calls to resume the conversation via Claude CLI's `--resume` flag.
|
|
338
|
+
|
|
339
|
+
- **Cumulative cost**: `totalCostUsd` in `_meta` is the cost for that call only. Cumulative cost across turns is tracked per-session and visible via `listSessions`
|
|
340
|
+
- **Reset**: Pass `resetSession: true` on the query tool to clear stored state and start fresh
|
|
341
|
+
- **TTL**: Sessions expire after 24 hours of inactivity
|
|
342
|
+
- **Capacity**: LRU eviction at 100 sessions (oldest by `lastUsedAt` is evicted)
|
|
343
|
+
- **Ephemeral**: Session state is in-memory only, lost on server restart
|
|
344
|
+
|
|
345
|
+
## Progress notifications
|
|
346
|
+
|
|
347
|
+
Query, review, and search tools emit MCP [`notifications/progress`](https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/progress) during subprocess execution when the client provides a `progressToken` in the request's `_meta`. Heartbeats fire every 15 seconds with elapsed time. Notifications are fire-and-forget; clients that don't support progress notifications are unaffected.
|
|
348
|
+
|
|
283
349
|
## Concurrency
|
|
284
350
|
|
|
285
351
|
Requests are queued with a FIFO scheduler. Default: 3 concurrent Claude CLI processes. If all slots are busy, new requests wait up to 30 seconds before being rejected. Timed-out processes are killed with SIGTERM, then SIGKILL after 5 seconds. On Unix, the entire process group is killed to clean up child processes.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ToolAnnotations } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* MCP tool annotations for all claude-mcp-bridge tools.
|
|
4
|
+
*
|
|
5
|
+
* Annotations are hints that help MCP clients understand tool behavior
|
|
6
|
+
* for permission prompts, safety checks, and orchestration decisions.
|
|
7
|
+
*
|
|
8
|
+
* readOnly: query/review/search/structured are false because they can persist
|
|
9
|
+
* Claude CLI session state to disk (~/.claude/) when sessionId is used.
|
|
10
|
+
* ping is true (purely local, no side effects).
|
|
11
|
+
*
|
|
12
|
+
* review: destructive=false because the default --allowed-tools list is read-only
|
|
13
|
+
* (Read, Grep, Glob, git). Callers that pass custom tools including write access
|
|
14
|
+
* should treat it as potentially destructive.
|
|
15
|
+
*
|
|
16
|
+
* Titles are set on the registerTool config in index.ts, not here (avoid duplication).
|
|
17
|
+
*/
|
|
18
|
+
export declare const queryAnnotations: ToolAnnotations;
|
|
19
|
+
export declare const reviewAnnotations: ToolAnnotations;
|
|
20
|
+
export declare const searchAnnotations: ToolAnnotations;
|
|
21
|
+
export declare const structuredAnnotations: ToolAnnotations;
|
|
22
|
+
export declare const listSessionsAnnotations: ToolAnnotations;
|
|
23
|
+
export declare const pingAnnotations: ToolAnnotations;
|
|
24
|
+
//# sourceMappingURL=annotations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../src/annotations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAE1E;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,gBAAgB,EAAE,eAK9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAK/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAK/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAKnC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAKrC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAK7B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tool annotations for all claude-mcp-bridge tools.
|
|
3
|
+
*
|
|
4
|
+
* Annotations are hints that help MCP clients understand tool behavior
|
|
5
|
+
* for permission prompts, safety checks, and orchestration decisions.
|
|
6
|
+
*
|
|
7
|
+
* readOnly: query/review/search/structured are false because they can persist
|
|
8
|
+
* Claude CLI session state to disk (~/.claude/) when sessionId is used.
|
|
9
|
+
* ping is true (purely local, no side effects).
|
|
10
|
+
*
|
|
11
|
+
* review: destructive=false because the default --allowed-tools list is read-only
|
|
12
|
+
* (Read, Grep, Glob, git). Callers that pass custom tools including write access
|
|
13
|
+
* should treat it as potentially destructive.
|
|
14
|
+
*
|
|
15
|
+
* Titles are set on the registerTool config in index.ts, not here (avoid duplication).
|
|
16
|
+
*/
|
|
17
|
+
export const queryAnnotations = {
|
|
18
|
+
readOnlyHint: false,
|
|
19
|
+
destructiveHint: false,
|
|
20
|
+
idempotentHint: false,
|
|
21
|
+
openWorldHint: true,
|
|
22
|
+
};
|
|
23
|
+
export const reviewAnnotations = {
|
|
24
|
+
readOnlyHint: false,
|
|
25
|
+
destructiveHint: false,
|
|
26
|
+
idempotentHint: false,
|
|
27
|
+
openWorldHint: true,
|
|
28
|
+
};
|
|
29
|
+
export const searchAnnotations = {
|
|
30
|
+
readOnlyHint: false,
|
|
31
|
+
destructiveHint: false,
|
|
32
|
+
idempotentHint: true,
|
|
33
|
+
openWorldHint: true,
|
|
34
|
+
};
|
|
35
|
+
export const structuredAnnotations = {
|
|
36
|
+
readOnlyHint: false,
|
|
37
|
+
destructiveHint: false,
|
|
38
|
+
idempotentHint: false,
|
|
39
|
+
openWorldHint: true,
|
|
40
|
+
};
|
|
41
|
+
export const listSessionsAnnotations = {
|
|
42
|
+
readOnlyHint: true,
|
|
43
|
+
destructiveHint: false,
|
|
44
|
+
idempotentHint: true,
|
|
45
|
+
openWorldHint: false,
|
|
46
|
+
};
|
|
47
|
+
export const pingAnnotations = {
|
|
48
|
+
readOnlyHint: true,
|
|
49
|
+
destructiveHint: false,
|
|
50
|
+
idempotentHint: true,
|
|
51
|
+
openWorldHint: false,
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=annotations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.js","sourceRoot":"","sources":["../src/annotations.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,KAAK;IACrB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAoB;IAChD,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,KAAK;IACrB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAoB;IAChD,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAoB;IACpD,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,KAAK;IACrB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAoB;IACtD,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACrB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rich tool descriptions for MCP clients.
|
|
3
|
+
*
|
|
4
|
+
* Descriptions include capability summaries, cost guidance, and prompt tips
|
|
5
|
+
* so calling LLMs can make informed tool selection and parameterization decisions.
|
|
6
|
+
*
|
|
7
|
+
* Keep each description at or under 2048 bytes to avoid bloating tool listings.
|
|
8
|
+
*/
|
|
9
|
+
export declare const queryDescription = "Execute a prompt via Claude Code CLI with optional file context and session resume. Claude is an AI coding agent that can generate, analyze, refactor, and explain code.\n\nCapabilities: code generation and refactoring, code analysis and explanation, file understanding (text and images), multi-turn conversations via sessionId.\n\nCost: Default model is Sonnet (~$0.01-0.10/call). Use effort=\"low\" for simple tasks, effort=\"high\" + model=\"opus\" for complex analysis. Set maxBudgetUsd to cap per-call cost (recommended for effort=\"max\" or model=\"opus\").\n\nTips:\n- Set workingDirectory to the target repo for project-aware responses.\n- Break complex tasks into focused prompts rather than one large request.\n- Resume multi-turn conversations with sessionId from a previous response's metadata.\n- Include relevant files via the files parameter for targeted context (text files inlined in prompt, images trigger allowed-tools mode).\n- Use noSessionPersistence=true for stateless one-shot calls.";
|
|
10
|
+
export declare const reviewDescription = "Repo-aware code review powered by Claude Code CLI. Returns structured feedback on code changes with two modes:\n\n- Agentic (default): Claude explores the repo with Read, Grep, Glob, and git tools. Reads changed files, follows imports, and examines related code before reviewing. Best for thorough reviews. Default timeout: 5 minutes.\n- Quick (quick: true): Receives only the diff text. Fast single-pass review without repo exploration. Default timeout: 2 minutes.\n\nCost: Both modes default to Opus (~$0.05-0.15 quick, ~$0.25-0.50 agentic). Override with model parameter. Use maxBudgetUsd to cap cost on large diffs.\n\nTips:\n- Use the focus parameter to direct attention: \"security\", \"performance\", \"error handling\", \"test coverage\".\n- Set workingDirectory to the repo being reviewed (auto-resolves to git root).\n- Default reviews uncommitted changes (staged + unstaged). Use base to review a branch diff (e.g. base: \"main\").\n- Prefer agentic mode for important reviews, quick mode for rapid feedback during development.";
|
|
11
|
+
export declare const searchDescription = "Web search via Claude Code CLI using WebSearch and WebFetch tools. Searches the web and synthesizes a comprehensive answer with source URLs.\n\nUse for: current information, documentation lookups, API references, comparing libraries, and research questions.\n\nCost: Typically ~$0.02-0.05/search with Sonnet.\n\nTips:\n- Ask specific, focused questions for best results.\n- Results include source URLs for verification.\n- Use maxResponseLength to control response verbosity.\n- Increase timeout for complex research queries that may require multiple web fetches.";
|
|
12
|
+
export declare const structuredDescription = "Generate JSON conforming to a provided JSON Schema. Uses Claude CLI's native --json-schema flag for validated output (not client-side validation).\n\nUse for: data extraction from text/files, classification, entity parsing, or any task needing machine-parseable output.\n\nCost: Similar to query (~$0.01-0.10/call). Schema complexity doesn't significantly affect cost.\n\nTips:\n- Pass the JSON Schema as a JSON string in the schema parameter.\n- Schema max size: 20KB. Keep schemas focused for reliable output.\n- For extraction tasks, include source text via the files parameter or inline in the prompt.";
|
|
13
|
+
export declare const listSessionsDescription = "List active Claude CLI sessions tracked by this server. Returns session metadata (IDs, models, timing, turn counts, cumulative cost) for orchestration. Use to check available sessions before resuming with sessionId. No cost (local lookup only).";
|
|
14
|
+
export declare const pingDescription = "Health check: verifies Claude CLI is installed and authenticated, reports versions, capabilities, and configuration. No cost (local check only).";
|
|
15
|
+
//# sourceMappingURL=descriptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptions.d.ts","sourceRoot":"","sources":["../src/descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,gBAAgB,m/BAWiC,CAAC;AAE/D,eAAO,MAAM,iBAAiB,mhCAWiE,CAAC;AAEhG,eAAO,MAAM,iBAAiB,wjBAUyD,CAAC;AAExF,eAAO,MAAM,qBAAqB,kmBAS2D,CAAC;AAE9F,eAAO,MAAM,uBAAuB,yPAAyP,CAAC;AAE9R,eAAO,MAAM,eAAe,qJAAqJ,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rich tool descriptions for MCP clients.
|
|
3
|
+
*
|
|
4
|
+
* Descriptions include capability summaries, cost guidance, and prompt tips
|
|
5
|
+
* so calling LLMs can make informed tool selection and parameterization decisions.
|
|
6
|
+
*
|
|
7
|
+
* Keep each description at or under 2048 bytes to avoid bloating tool listings.
|
|
8
|
+
*/
|
|
9
|
+
export const queryDescription = `Execute a prompt via Claude Code CLI with optional file context and session resume. Claude is an AI coding agent that can generate, analyze, refactor, and explain code.
|
|
10
|
+
|
|
11
|
+
Capabilities: code generation and refactoring, code analysis and explanation, file understanding (text and images), multi-turn conversations via sessionId.
|
|
12
|
+
|
|
13
|
+
Cost: Default model is Sonnet (~$0.01-0.10/call). Use effort="low" for simple tasks, effort="high" + model="opus" for complex analysis. Set maxBudgetUsd to cap per-call cost (recommended for effort="max" or model="opus").
|
|
14
|
+
|
|
15
|
+
Tips:
|
|
16
|
+
- Set workingDirectory to the target repo for project-aware responses.
|
|
17
|
+
- Break complex tasks into focused prompts rather than one large request.
|
|
18
|
+
- Resume multi-turn conversations with sessionId from a previous response's metadata.
|
|
19
|
+
- Include relevant files via the files parameter for targeted context (text files inlined in prompt, images trigger allowed-tools mode).
|
|
20
|
+
- Use noSessionPersistence=true for stateless one-shot calls.`;
|
|
21
|
+
export const reviewDescription = `Repo-aware code review powered by Claude Code CLI. Returns structured feedback on code changes with two modes:
|
|
22
|
+
|
|
23
|
+
- Agentic (default): Claude explores the repo with Read, Grep, Glob, and git tools. Reads changed files, follows imports, and examines related code before reviewing. Best for thorough reviews. Default timeout: 5 minutes.
|
|
24
|
+
- Quick (quick: true): Receives only the diff text. Fast single-pass review without repo exploration. Default timeout: 2 minutes.
|
|
25
|
+
|
|
26
|
+
Cost: Both modes default to Opus (~$0.05-0.15 quick, ~$0.25-0.50 agentic). Override with model parameter. Use maxBudgetUsd to cap cost on large diffs.
|
|
27
|
+
|
|
28
|
+
Tips:
|
|
29
|
+
- Use the focus parameter to direct attention: "security", "performance", "error handling", "test coverage".
|
|
30
|
+
- Set workingDirectory to the repo being reviewed (auto-resolves to git root).
|
|
31
|
+
- Default reviews uncommitted changes (staged + unstaged). Use base to review a branch diff (e.g. base: "main").
|
|
32
|
+
- Prefer agentic mode for important reviews, quick mode for rapid feedback during development.`;
|
|
33
|
+
export const searchDescription = `Web search via Claude Code CLI using WebSearch and WebFetch tools. Searches the web and synthesizes a comprehensive answer with source URLs.
|
|
34
|
+
|
|
35
|
+
Use for: current information, documentation lookups, API references, comparing libraries, and research questions.
|
|
36
|
+
|
|
37
|
+
Cost: Typically ~$0.02-0.05/search with Sonnet.
|
|
38
|
+
|
|
39
|
+
Tips:
|
|
40
|
+
- Ask specific, focused questions for best results.
|
|
41
|
+
- Results include source URLs for verification.
|
|
42
|
+
- Use maxResponseLength to control response verbosity.
|
|
43
|
+
- Increase timeout for complex research queries that may require multiple web fetches.`;
|
|
44
|
+
export const structuredDescription = `Generate JSON conforming to a provided JSON Schema. Uses Claude CLI's native --json-schema flag for validated output (not client-side validation).
|
|
45
|
+
|
|
46
|
+
Use for: data extraction from text/files, classification, entity parsing, or any task needing machine-parseable output.
|
|
47
|
+
|
|
48
|
+
Cost: Similar to query (~$0.01-0.10/call). Schema complexity doesn't significantly affect cost.
|
|
49
|
+
|
|
50
|
+
Tips:
|
|
51
|
+
- Pass the JSON Schema as a JSON string in the schema parameter.
|
|
52
|
+
- Schema max size: 20KB. Keep schemas focused for reliable output.
|
|
53
|
+
- For extraction tasks, include source text via the files parameter or inline in the prompt.`;
|
|
54
|
+
export const listSessionsDescription = `List active Claude CLI sessions tracked by this server. Returns session metadata (IDs, models, timing, turn counts, cumulative cost) for orchestration. Use to check available sessions before resuming with sessionId. No cost (local lookup only).`;
|
|
55
|
+
export const pingDescription = `Health check: verifies Claude CLI is installed and authenticated, reports versions, capabilities, and configuration. No cost (local check only).`;
|
|
56
|
+
//# sourceMappingURL=descriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptions.js","sourceRoot":"","sources":["../src/descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;8DAW8B,CAAC;AAE/D,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;+FAW8D,CAAC;AAEhG,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;uFAUsD,CAAC;AAExF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;6FASwD,CAAC;AAE9F,MAAM,CAAC,MAAM,uBAAuB,GAAG,sPAAsP,CAAC;AAE9R,MAAM,CAAC,MAAM,eAAe,GAAG,kJAAkJ,CAAC"}
|