Skip to main content
Glama
hampsterx

claude-mcp-bridge

by hampsterx

Claude Query

query

Execute prompts through Claude CLI with optional file context, model selection, cost caps, and session resume for code generation, analysis, refactoring, and explanation.

Instructions

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.

Capabilities: code generation and refactoring, code analysis and explanation, file understanding (text and images), multi-turn conversations via sessionId.

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").

Tips:

  • Set workingDirectory to the target repo for project-aware responses.

  • Break complex tasks into focused prompts rather than one large request.

  • Resume multi-turn conversations with sessionId from a previous response's metadata.

  • Include relevant files via the files parameter for targeted context (text files inlined in prompt, images trigger allowed-tools mode).

  • Use noSessionPersistence=true for stateless one-shot calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNoFile paths (text or images) relative to workingDirectory
modelNoModel alias or full Claude model name
effortNoEffort level: low, medium, high, or max (passed to --effort)
promptYesThe prompt to send to Claude
timeoutNoTimeout in milliseconds (default: 60000, image queries: 120000)
sessionIdNoClaude session ID to resume with --resume
maxBudgetUsdNoMaximum cost budget in USD for this call (passed to --max-budget-usd)
resetSessionNoClear stored session state before execution (use with sessionId to start fresh)
workingDirectoryNoWorking directory for file resolution and CLI execution
maxResponseLengthNoSoft limit on response length in words
noSessionPersistenceNoDisable session persistence for ephemeral print calls
Behavior4/5

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

Annotations indicate non-destructive and non-idempotent behavior with open-world hint. The description adds context: capabilities, cost structure, session management, and limitations like image query timeout. No contradiction with annotations; the tool's potential to generate/refactor code is noted but not claimed to modify persistent data.

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 fairly lengthy but front-loaded with the core purpose, followed by capabilities, cost, and tips. It is well-structured but could be slightly more concise without losing value.

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?

Given the tool's complexity (11 parameters, no output schema), the description is comprehensive: covers purpose, usage, parameter semantics, cost, and practical tips. It adequately equips an agent to understand when and how to invoke the tool.

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 description coverage is 100%, and the description adds valuable meaning beyond each parameter's schema: explains files as text/images, sessionId for resume, maxBudgetUsd as cost cap, effort levels, and workingDirectory for context. Tips further clarify parameter usage.

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 'Execute a prompt via Claude Code CLI' and lists capabilities like code generation, analysis, and multi-turn conversations. It distinguishes itself from sibling tools (listSessions, ping, search, structured) by focusing on prompt execution with optional file context and session resume.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides extensive usage guidance: cost info, effort levels for different task complexities, tips for workingDirectory, breaking tasks, resuming sessions, including files, and stateless calls. However, it does not explicitly compare this tool to siblings (e.g., when to use search instead).

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/hampsterx/claude-mcp-bridge'

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