Skip to main content
Glama
kitan23

Dedalus MCP Documentation Server

by kitan23

analyze_docs

Analyze documentation for tasks like finding gaps, generating outlines, or checking consistency to prepare results for agent handoffs.

Instructions

Analyze documentation for specific tasks (foundation for agent handoffs)

Args:
    task: Analysis task (e.g., "find_gaps", "generate_outline", "check_consistency")
    docs: Optional list of specific documents to analyze
    output_format: Output format (summary, detailed, structured)

Returns:
    Analysis results ready for agent handoff

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYes
docsNo
output_formatNosummary

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The complete implementation of the analyze_docs tool, including the @mcp.tool() decorator for registration, type-hinted parameters serving as input schema, docstring, validation logic, document gathering via list_docs(), and structured output for agent handoffs.
    @mcp.tool()
    def analyze_docs(
        task: str, docs: Optional[List[str]] = None, output_format: str = 'summary'
    ) -> Dict[str, Any]:
        """
        Analyze documentation for specific tasks (foundation for agent handoffs)
    
        Args:
            task: Analysis task (e.g., "find_gaps", "generate_outline", "check_consistency")
            docs: Optional list of specific documents to analyze
            output_format: Output format (summary, detailed, structured)
    
        Returns:
            Analysis results ready for agent handoff
        """
        available_tasks = [
            'find_gaps',
            'generate_outline',
            'check_consistency',
            'extract_examples',
            'identify_prerequisites',
            'suggest_improvements',
        ]
    
        if task not in available_tasks:
            return {
                'error': f'Unknown task. Available tasks: {", ".join(available_tasks)}',
                'available_tasks': available_tasks,
            }
    
        # Gather documents to analyze
        if not docs:
            all_docs = list_docs()
            docs = [doc['path'] for doc in all_docs]
    
        # This is where different analysis agents would be invoked
        # Structure the response for easy handoff to specialized agents
        return {
            'task': task,
            'documents_analyzed': len(docs),
            'output_format': output_format,
            'results': {
                'summary': f"Analysis task '{task}' ready for processing",
                'documents': docs,
                'next_steps': [
                    'Connect specialized agent for this task',
                    'Process documents according to task requirements',
                    'Return structured results',
                ],
            },
            'agent_handoff_ready': True,
            'suggested_model': 'gpt-4'
            if task in ['find_gaps', 'check_consistency']
            else 'claude-3-5-sonnet',
        }
  • src/main.py:49-49 (registration)
    The analyze_docs tool is listed in the MCP server instructions as an available tool with its description.
    - analyze_docs(task): Analyze documentation for specific tasks
  • src/main.py:539-539 (registration)
    The analyze_docs tool is listed among available tools in the test mode print statement.
    'Tools available: list_docs, search_docs, ask_docs, index_docs, analyze_docs'
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 the tool analyzes documentation and returns results 'ready for agent handoff', but doesn't disclose critical behavioral traits such as whether it modifies data (likely read-only but unspecified), performance characteristics, error handling, or authentication needs. The description is too brief to adequately inform an agent about how the tool behaves beyond basic input-output.

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 appropriately sized and front-loaded with the core purpose. The Args and Returns sections are structured clearly, though the initial sentence could be more direct. There's minimal waste, but the phrase 'foundation for agent handoffs' is somewhat ambiguous and could be more precise.

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

Completeness3/5

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

Given the tool has 3 parameters with 0% schema coverage and an output schema exists, the description does a fair job. It explains parameter semantics well, but lacks behavioral context (no annotations) and usage guidelines. The output schema means the description doesn't need to detail return values, but overall completeness is moderate due to missing guidance and transparency.

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

Parameters4/5

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

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'task' is for analysis tasks like 'find_gaps', 'generate_outline', or 'check_consistency', 'docs' is an optional list of specific documents, and 'output_format' controls the output (e.g., summary, detailed, structured). This compensates well for the lack of schema descriptions, though it doesn't cover all possible parameter nuances.

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

Purpose3/5

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

The description states the tool 'Analyze documentation for specific tasks' which provides a clear verb ('analyze') and resource ('documentation'), but it's somewhat vague about what 'analyze' entails. It distinguishes from siblings like 'list_docs' or 'search_docs' by focusing on analysis rather than retrieval, but doesn't explicitly differentiate from 'ask_docs' which might also involve analysis. The phrase 'foundation for agent handoffs' adds context but doesn't clarify the core purpose.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'ask_docs' or 'search_docs'. It mentions this is a 'foundation for agent handoffs', which implies a specific context but doesn't specify when this tool is preferred over other analysis or documentation tools. No exclusions, prerequisites, or alternatives 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/kitan23/Python_MCP_Server_Example_2'

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