Skip to main content
Glama

Claude Query

query

Execute code generation, analysis, refactoring, and explanation prompts via Claude Code CLI. Supports file context, session resume, model selection, and cost control.

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

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

Annotations already provide non-read-only and non-destructive hints; the description adds behavioral details like cost estimates, file handling (text inlined, images trigger allowed-tools mode), and session behavior, going beyond annotations.

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 well-structured with clear sections (purpose, capabilities, cost, tips) and is front-loaded with the primary action. While lengthy, every sentence provides useful information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 11 parameters and no output schema, the description covers usage scenarios, tips, and cost management comprehensively. It lacks explicit return value details but references sessionId in metadata, which is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all parameters. The description adds contextual advice (e.g., effort levels for specific tasks) but does not significantly augment parameter semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes a prompt via Claude Code CLI, lists capabilities (code generation, analysis, etc.), and implicitly differentiates from sibling tools like listSessions and ping by focusing on prompt execution.

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

Usage Guidelines3/5

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

The description provides detailed usage tips (setting workingDirectory, breaking tasks, using sessionId) and cost guidance (effort levels, maxBudgetUsd), but does not explicitly contrast with sibling tools for when to use this tool vs search or structured.

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