Skip to main content
Glama
taylorleese

mcp-toolz

ask_claude

Ask Claude questions about saved contexts or get general second opinions to clarify information and verify understanding.

Instructions

Ask Claude a question about a context entry, or get a general second opinion

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_idYesContext ID to ask about
questionNoOptional specific question to ask about the context. If not provided, gets a general second opinion.

Implementation Reference

  • Main handler logic for the 'ask_claude' tool: retrieves context by ID, instantiates ClaudeClient, calls get_second_opinion, optionally stores response, and returns formatted output.
    if name == "ask_claude":
        context_id = arguments["context_id"]
        question = arguments.get("question")
        context = self.storage.get_context(context_id)
        if not context:
            return [TextContent(type="text", text=f"Context {context_id} not found")]
    
        try:
            claude_client = ClaudeClient()
            response = claude_client.get_second_opinion(context, question)
    
            # Only save to database if it's a generic second opinion (no custom question)
            if not question:
                self.storage.update_claude_response(context_id, response)
    
            header = "Claude's Answer:" if question else "Claude's Opinion:"
            return [TextContent(type="text", text=f"{header}\n\n{response}")]
        except ValueError as e:
            return [TextContent(type="text", text=f"Error: {e}")]
  • Tool schema definition including name, description, and input schema requiring 'context_id' and optional 'question'.
    Tool(
        name="ask_claude",
        description="Ask Claude a question about a context entry, or get a general second opinion",
        inputSchema={
            "type": "object",
            "properties": {
                "context_id": {"type": "string", "description": "Context ID to ask about"},
                "question": {
                    "type": "string",
                    "description": (
                        "Optional specific question to ask about the context. If not provided, gets a general second opinion."
                    ),
                },
            },
            "required": ["context_id"],
        },
    ),
  • Core helper function in ClaudeClient that formats the context prompt and calls the Anthropic Claude API to generate the response.
        def get_second_opinion(self, context: ContextEntry, question: str | None = None) -> str:
            """Get Claude's second opinion on a context, or answer a specific question.
    
            Args:
                context: The context entry to analyze
                question: Optional specific question to ask. If None, provides general second opinion.
            """
            if question:
                # Custom question mode
                system_prompt = """You are a senior software engineering consultant answering questions about code, \
    architecture decisions, and implementation plans.
    
    Provide clear, actionable answers based on the context provided."""
                user_content = self._format_context_for_claude(context, question)
            else:
                # Generic second opinion mode
                system_prompt = """You are a senior software engineering consultant providing second opinions on code, \
    architecture decisions, and implementation plans.
    
    Your role is to:
    - Provide constructive, balanced feedback
    - Highlight both strengths and potential issues
    - Suggest alternatives when appropriate
    - Point out edge cases or security concerns
    - Be concise but thorough
    
    Format your response clearly with sections as needed."""
                user_content = self._format_context_for_claude(context)
    
            response = self.client.messages.create(
                model=self.model,
                max_tokens=4096,
                system=system_prompt,
                messages=[
                    {"role": "user", "content": user_content},
                ],
                temperature=0.7,
            )
    
            if response.content and isinstance(response.content[0], TextBlock):
                return response.content[0].text
            return ""
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions asking Claude but doesn't disclose behavioral traits such as response format, rate limits, authentication needs, or whether it's read-only or has side effects. The description is vague about what 'general second opinion' entails, leaving gaps in transparency for an AI agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Ask Claude a question about a context entry, or get a general second opinion.' It's front-loaded with the core purpose and uses no wasted words, making it highly concise and well-structured for quick understanding.

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

Completeness2/5

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

Given no annotations, no output schema, and a tool that interacts with an AI model (Claude), the description is incomplete. It doesn't explain what the tool returns, how errors are handled, or any constraints like token limits. For a query tool with potential complexity, more context is needed to guide an AI agent effectively.

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 description coverage is 100%, so the schema already documents both parameters (context_id and question). The description adds minimal value beyond the schema: it implies that question is optional and relates to context or general opinion, but doesn't provide additional syntax or format details. Baseline 3 is appropriate as the schema does the heavy lifting.

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's purpose: 'Ask Claude a question about a context entry, or get a general second opinion.' It specifies the verb ('ask') and resource ('Claude'), distinguishing it from sibling tools like ask_chatgpt or ask_gemini. However, it doesn't explicitly differentiate from other Claude-related tools (none exist in siblings), so it's not a perfect 5.

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 implies usage by stating 'about a context entry' or 'general second opinion,' which suggests when to use it (for querying Claude with context or general advice). However, it lacks explicit guidance on when to choose this over alternatives like ask_chatgpt or when not to use it (e.g., for non-query tasks). No exclusions or prerequisites are mentioned.

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/taylorleese/mcp-toolz'

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