> ## Documentation Index
> Fetch the complete documentation index at: https://docs.initrepo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Complete MCP Tools Reference

> Comprehensive guide to all 37+ InitRepo MCP tools with examples and advanced features

## MCP Tools Overview

InitRepo MCP Server provides 37+ specialized tools organized into five major categories. Each tool is designed to transform InitRepo documentation into actionable development insights.

<CardGroup cols={2}>
  <Card title="Project Analysis" icon="magnifying-glass">
    Deep project understanding and structure analysis
  </Card>

  <Card title="Context Generation" icon="brain">
    AI-ready context creation for development tasks
  </Card>

  <Card title="Progress Intelligence" icon="chart-line">
    Real-time progress tracking and bottleneck identification
  </Card>

  <Card title="Quality Assurance" icon="shield-check">
    Documentation validation and completeness checking
  </Card>
</CardGroup>

<Warning>
  **Prerequisites**: All MCP tools require InitRepo-generated documentation with proper ID structure (T-001, US-001, E-001, etc.) in your project's `/docs` folder.
</Warning>

## Core Analysis Tools

### `getProjectMap`

**Purpose**: Retrieves complete project structure and relationship mapping

<Tabs>
  <Tab title="Usage">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "getProjectMap",
        "arguments": {
          "includeRelationships": true,
          "depth": "full",
          "format": "structured"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Response">
    ```json theme={null}
    {
      "project": {
        "name": "User Management System",
        "epics": [
          {
            "id": "E-001",
            "title": "User Authentication",
            "userStories": ["US-001", "US-002", "US-003"],
            "tasks": ["T-001", "T-002", "T-005"],
            "status": "in-progress",
            "completion": 65
          }
        ],
        "dependencies": {
          "T-001": ["T-002", "T-005"],
          "US-001": ["US-002"]
        }
      }
    }
    ```
  </Tab>

  <Tab title="AI Usage">
    ```
    AI Assistant: "Can you show me the complete project structure?"

    Response: Based on your InitRepo documentation, here's your project map:

    Epic E-001: User Authentication (65% complete)
    ├── US-001: User Registration (completed)
    ├── US-002: Login System (in progress)
    └── US-003: Password Reset (pending)

    Critical Dependencies:
    - T-001 blocks US-002 completion
    - T-002 required before T-005 can start
    ```
  </Tab>
</Tabs>

**Parameters:**

* `includeRelationships` (boolean): Include dependency mappings
* `depth` (string): "summary", "detailed", "full"
* `format` (string): "structured", "flat", "hierarchical"

### `getContext`

**Purpose**: Retrieve comprehensive context for any project element by ID

<AccordionGroup>
  <Accordion title="Task Context Example">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "getContext",
        "arguments": {
          "id": "T-001",
          "includeImplementationGuidance": true,
          "includeDependencies": true,
          "includeAcceptanceCriteria": true
        }
      }
    }
    ```

    **AI Usage:**

    ```
    "Show me the context for task T-001 with implementation guidance"
    ```
  </Accordion>

  <Accordion title="User Story Context Example">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "getContext",
        "arguments": {
          "id": "US-005",
          "includeUserFlow": true,
          "includeDesignSpecs": true,
          "includeTestingGuidance": true
        }
      }
    }
    ```

    **AI Usage:**

    ```
    "I need complete context for user story US-005 including design specifications"
    ```
  </Accordion>

  <Accordion title="Epic Context Example">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "getContext",
        "arguments": {
          "id": "E-001",
          "includeBusinessValue": true,
          "includeArchitecturalImpact": true,
          "includeResourceEstimates": true
        }
      }
    }
    ```

    **AI Usage:**

    ```
    "Provide comprehensive epic context for E-001 with business justification"
    ```
  </Accordion>
</AccordionGroup>

### `validateDocumentationCompleteness`

**Purpose**: Ensures all project documentation is complete and properly structured

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "validateDocumentationCompleteness",
    "arguments": {
      "scope": "all",
      "includeRecommendations": true,
      "strictMode": false
    }
  }
}
```

**Response Analysis:**

* **Completeness Score**: 0-100 rating of documentation quality
* **Missing Elements**: Specific gaps in documentation
* **Inconsistencies**: Cross-reference conflicts or missing links
* **Recommendations**: Specific improvement suggestions

## Context Generation Tools

### `generateSmartImplementationBrief`

**Purpose**: Creates detailed implementation guidance from requirements

<Tabs>
  <Tab title="Basic Usage">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "generateSmartImplementationBrief",
        "arguments": {
          "taskId": "T-003",
          "includeCodeExamples": true,
          "includeTestingGuidance": true,
          "complexityLevel": "detailed"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Advanced Usage">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "generateSmartImplementationBrief",
        "arguments": {
          "taskId": "US-007",
          "includeArchitecturalConsiderations": true,
          "includeSecurityRequirements": true,
          "includePerformanceTargets": true,
          "includeIntegrationPoints": true,
          "targetAudience": "senior-developer"
        }
      }
    }
    ```
  </Tab>
</Tabs>

**Generated Brief Includes:**

* **Technical Approach**: Step-by-step implementation strategy
* **Code Structure**: Recommended file organization and component structure
* **Integration Points**: APIs, databases, and external service connections
* **Testing Strategy**: Unit, integration, and end-to-end testing approaches
* **Security Considerations**: Authentication, authorization, and data protection
* **Performance Targets**: Expected performance benchmarks and optimization strategies

### `generateContextForTask`

**Purpose**: Transform task specifications into AI-ready development context

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "generateContextForTask",
    "arguments": {
      "taskId": "T-012",
      "includePrerequisites": true,
      "includeSuccessCriteria": true,
      "includeRiskFactors": true
    }
  }
}
```

**Context Output:**

* **Objective**: Clear task purpose and expected outcomes
* **Prerequisites**: Required completed tasks and system states
* **Implementation Steps**: Detailed development workflow
* **Success Criteria**: Measurable completion requirements
* **Risk Mitigation**: Potential challenges and solutions

### `generateContextForUserStory`

**Purpose**: Convert user stories into actionable development guidance

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "generateContextForUserStory",
    "arguments": {
      "userStoryId": "US-004",
      "includeUserJourney": true,
      "includeBusinessLogic": true,
      "includeUIRequirements": true,
      "includeDataRequirements": true
    }
  }
}
```

**Generated Context:**

* **User Journey**: Complete user interaction flow
* **Business Logic**: Rules and processing requirements
* **UI/UX Requirements**: Interface design and interaction patterns
* **Data Requirements**: Database schema and API specifications
* **Acceptance Testing**: Comprehensive test scenarios

## Progress Intelligence Tools

### `trackTaskProgress`

**Purpose**: Monitor task completion and identify development bottlenecks

<AccordionGroup>
  <Accordion title="Individual Task Tracking">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "trackTaskProgress",
        "arguments": {
          "taskId": "T-001",
          "includeVelocity": true,
          "includeBlockers": true,
          "timeframe": "current-sprint"
        }
      }
    }
    ```

    **Response:**

    * Current completion percentage
    * Time spent vs. estimated effort
    * Blocking dependencies
    * Velocity trends
  </Accordion>

  <Accordion title="Epic Progress Tracking">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "trackTaskProgress",
        "arguments": {
          "epicId": "E-002",
          "includeChildProgress": true,
          "includeCriticalPath": true,
          "includeResourceUtilization": true
        }
      }
    }
    ```

    **Response:**

    * Overall epic completion
    * Individual story progress
    * Critical path analysis
    * Resource allocation efficiency
  </Accordion>
</AccordionGroup>

### `identifyBlockingDependencies`

**Purpose**: Find critical path dependencies and development blockers

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "identifyBlockingDependencies",
    "arguments": {
      "scope": "project",
      "priorityLevel": "critical",
      "includeResolutionSuggestions": true
    }
  }
}
```

**Analysis Output:**

* **Critical Blockers**: Dependencies preventing multiple tasks
* **Resource Conflicts**: Competing requirements for same resources
* **Sequence Issues**: Tasks that must be reordered for efficiency
* **Resolution Strategies**: Specific approaches to resolve blockers

### `generateProgressReport`

**Purpose**: Create comprehensive progress summaries and forecasts

<Tabs>
  <Tab title="Sprint Report">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "generateProgressReport",
        "arguments": {
          "scope": "current-sprint",
          "includeVelocity": true,
          "includeForecasting": true,
          "format": "executive-summary"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Project Report">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "generateProgressReport",
        "arguments": {
          "scope": "entire-project",
          "includeRiskAssessment": true,
          "includeMilestoneTracking": true,
          "includeResourceAnalysis": true,
          "format": "detailed"
        }
      }
    }
    ```
  </Tab>
</Tabs>

### `calculateProjectVelocity`

**Purpose**: Analyze development velocity and predict completion times

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "calculateProjectVelocity",
    "arguments": {
      "timeframe": "last-4-sprints",
      "includeConfidenceIntervals": true,
      "adjustForComplexity": true,
      "includeSeasonality": true
    }
  }
}
```

**Velocity Analysis:**

* **Current Velocity**: Tasks completed per time period
* **Trend Analysis**: Velocity changes over time
* **Confidence Intervals**: Reliability of velocity predictions
* **Completion Forecasts**: Projected delivery dates for milestones

## Quality Assurance Tools

### `crossReferenceResolver`

**Purpose**: Resolve complex cross-references between project elements

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "crossReferenceResolver",
    "arguments": {
      "sourceId": "US-001",
      "targetType": "all",
      "includeIndirectReferences": true,
      "maxDepth": 3
    }
  }
}
```

**Resolution Output:**

* **Direct References**: Immediate relationships (US-001 → T-001, T-002)
* **Indirect References**: Secondary relationships (US-001 → T-001 → T-005)
* **Missing References**: Potential connections not documented
* **Circular Dependencies**: Problematic circular relationships

### `analyzeDependencies`

**Purpose**: Map task dependencies and validate dependency chains

<AccordionGroup>
  <Accordion title="Dependency Mapping">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "analyzeDependencies",
        "arguments": {
          "rootElement": "E-001",
          "includeTransitiveDependencies": true,
          "validateConsistency": true,
          "identifyOptimizations": true
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Critical Path Analysis">
    ```json theme={null}
    {
      "method": "tools/call",
      "params": {
        "name": "analyzeDependencies",
        "arguments": {
          "analysisType": "critical-path",
          "includeFloatCalculation": true,
          "identifyBottlenecks": true,
          "suggestOptimizations": true
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### `validateRequirementConsistency`

**Purpose**: Check for conflicts and inconsistencies in requirements

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "validateRequirementConsistency",
    "arguments": {
      "scope": "all",
      "checkBusinessLogicConsistency": true,
      "checkTechnicalConsistency": true,
      "checkUserExperienceConsistency": true,
      "includeResolutionSuggestions": true
    }
  }
}
```

## Advanced Intelligence Tools

### `generateImplementationPlan`

**Purpose**: Create comprehensive step-by-step implementation strategies

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "generateImplementationPlan",
    "arguments": {
      "targetId": "E-001",
      "includeMilestones": true,
      "includeResourceAllocation": true,
      "includeRiskMitigation": true,
      "planningHorizon": "3-months"
    }
  }
}
```

**Implementation Plan Components:**

* **Phase Breakdown**: Logical implementation phases
* **Milestone Definition**: Key deliverables and checkpoints
* **Resource Requirements**: Team composition and skill requirements
* **Risk Assessment**: Potential challenges and mitigation strategies
* **Quality Gates**: Review points and acceptance criteria

### `predictCompletionTimes`

**Purpose**: Estimate realistic completion timelines using AI analysis

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "predictCompletionTimes",
    "arguments": {
      "elementIds": ["US-001", "US-002", "US-003"],
      "includeConfidenceIntervals": true,
      "considerResourceConstraints": true,
      "includeMonteCarlo": true,
      "scenarioAnalysis": ["best-case", "worst-case", "most-likely"]
    }
  }
}
```

### `generateRiskAssessment`

**Purpose**: Proactive identification of technical and project risks

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "generateRiskAssessment",
    "arguments": {
      "scope": "project",
      "riskCategories": ["technical", "business", "timeline", "resource"],
      "includeMitigationStrategies": true,
      "prioritizeByImpact": true
    }
  }
}
```

## Specialized Workflow Tools

### `optimizeTaskSequencing`

**Purpose**: Suggest optimal task ordering for maximum efficiency

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "optimizeTaskSequencing",
    "arguments": {
      "scope": "next-sprint",
      "optimizeFor": "velocity",
      "considerResourceConstraints": true,
      "includeParallelizationOpportunities": true
    }
  }
}
```

### `generateTestingStrategy`

**Purpose**: Create comprehensive testing approaches for requirements

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "generateTestingStrategy",
    "arguments": {
      "targetId": "US-005",
      "testTypes": ["unit", "integration", "e2e", "performance"],
      "includeTestData": true,
      "includeAutomationGuidance": true
    }
  }
}
```

### `analyzeArchitecturalImpact`

**Purpose**: Assess architectural implications of requirements changes

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "analyzeArchitecturalImpact",
    "arguments": {
      "changeId": "T-015",
      "includeDownstreamEffects": true,
      "includePerformanceImpact": true,
      "includeSecurityImplications": true
    }
  }
}
```

## Real-World Usage Examples

### Daily Development Workflow

```json theme={null}
// Morning standup preparation
{
  "method": "tools/call",
  "params": {
    "name": "generateProgressReport",
    "arguments": {
      "scope": "my-tasks",
      "timeframe": "yesterday",
      "includeBlockers": true
    }
  }
}

// Getting context for today's work
{
  "method": "tools/call",
  "params": {
    "name": "getContext",
    "arguments": {
      "id": "T-007",
      "includeImplementationGuidance": true,
      "includeDependencies": true
    }
  }
}
```

### Sprint Planning

```json theme={null}
// Sprint capacity analysis
{
  "method": "tools/call",
  "params": {
    "name": "calculateProjectVelocity",
    "arguments": {
      "includeTeamCapacity": true,
      "adjustForComplexity": true
    }
  }
}

// Task prioritization
{
  "method": "tools/call",
  "params": {
    "name": "optimizeTaskSequencing",
    "arguments": {
      "scope": "next-sprint",
      "optimizeFor": "business-value"
    }
  }
}
```

### Code Review Preparation

```json theme={null}
// Implementation validation
{
  "method": "tools/call",
  "params": {
    "name": "validateRequirementConsistency",
    "arguments": {
      "scope": "T-003",
      "includeImplementationCheck": true
    }
  }
}

// Testing completeness check
{
  "method": "tools/call",
  "params": {
    "name": "generateTestingStrategy",
    "arguments": {
      "targetId": "T-003",
      "validateCurrentTests": true
    }
  }
}
```

## Performance Optimization

### Tool Response Caching

Most MCP tools implement intelligent caching:

* **Response Caching**: Identical queries return cached results
* **Incremental Updates**: Only recompute changed dependencies
* **Smart Invalidation**: Cache automatically invalidates when documentation changes

### Batch Operations

```json theme={null}
// Process multiple elements efficiently
{
  "method": "tools/call",
  "params": {
    "name": "getContext",
    "arguments": {
      "ids": ["T-001", "T-002", "T-003"],
      "batchMode": true,
      "parallelProcessing": true
    }
  }
}
```

### Background Processing

```json theme={null}
// Non-blocking analysis for large projects
{
  "method": "tools/call",
  "params": {
    "name": "generateProgressReport",
    "arguments": {
      "scope": "entire-project",
      "backgroundProcessing": true,
      "callbackUrl": "/webhook/progress-complete"
    }
  }
}
```

## Custom Tool Configuration

### Environment Variables

```bash theme={null}
# Performance tuning
export INITREPO_MCP_CACHE_SIZE=256MB
export INITREPO_MCP_PARALLEL_LIMIT=4
export INITREPO_MCP_TIMEOUT=30000

# Feature flags
export INITREPO_MCP_ENABLE_PREDICTIONS=true
export INITREPO_MCP_ENABLE_RISK_ANALYSIS=true
export INITREPO_MCP_DETAILED_LOGGING=false
```

### Tool-Specific Configuration

```json theme={null}
{
  "mcpTools": {
    "getContext": {
      "defaultDepth": "detailed",
      "cacheEnabled": true,
      "cacheTTL": 300
    },
    "generateProgressReport": {
      "defaultFormat": "structured",
      "includeCharts": true,
      "backgroundThreshold": 100
    }
  }
}
```

## Advanced Intelligence Tools

### `generateImplementationPlan`

**Purpose**: Create comprehensive step-by-step implementation strategies

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "generateImplementationPlan",
    "arguments": {
      "targetId": "E-001",
      "includeMilestones": true,
      "includeResourceAllocation": true,
      "includeRiskMitigation": true,
      "planningHorizon": "3-months"
    }
  }
}
```

**Implementation Plan Components:**

* **Phase Breakdown**: Logical implementation phases
* **Milestone Definition**: Key deliverables and checkpoints
* **Resource Requirements**: Team composition and skill requirements
* **Risk Assessment**: Potential challenges and mitigation strategies
* **Quality Gates**: Review points and acceptance criteria

### `predictCompletionTimes`

**Purpose**: Estimate realistic completion timelines using AI analysis

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "predictCompletionTimes",
    "arguments": {
      "elementIds": ["US-001", "US-002", "US-003"],
      "includeConfidenceIntervals": true,
      "considerResourceConstraints": true,
      "includeMonteCarlo": true,
      "scenarioAnalysis": ["best-case", "worst-case", "most-likely"]
    }
  }
}
```

### `generateRiskAssessment`

**Purpose**: Proactive identification of technical and project risks

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "generateRiskAssessment",
    "arguments": {
      "scope": "project",
      "riskCategories": ["technical", "business", "timeline", "resource"],
      "includeMitigationStrategies": true,
      "prioritizeByImpact": true
    }
  }
}
```

### Specialized Workflow Tools

**Task Sequencing Optimization:**

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "optimizeTaskSequencing",
    "arguments": {
      "scope": "next-sprint",
      "optimizeFor": "velocity",
      "considerResourceConstraints": true,
      "includeParallelizationOpportunities": true
    }
  }
}
```

**Testing Strategy Generation:**

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "generateTestingStrategy",
    "arguments": {
      "targetId": "US-005",
      "testTypes": ["unit", "integration", "e2e", "performance"],
      "includeTestData": true,
      "includeAutomationGuidance": true
    }
  }
}
```

**Architectural Impact Analysis:**

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "analyzeArchitecturalImpact",
    "arguments": {
      "changeId": "T-015",
      "includeDownstreamEffects": true,
      "includePerformanceImpact": true,
      "includeSecurityImplications": true
    }
  }
}
```

## Best Practices

### Efficient Tool Usage

1. **Use Batch Operations**: Process multiple elements together when possible
2. **Cache Management**: Enable caching for frequently accessed contexts
3. **Scope Appropriately**: Use specific scopes rather than "all" when possible
4. **Background Processing**: Use background mode for large analysis operations

### Integration Patterns

1. **Morning Workflow**: Start with progress reports and task prioritization
2. **Implementation Phase**: Use context generation and implementation briefs
3. **Review Phase**: Employ validation and consistency checking tools
4. **Planning Phase**: Leverage forecasting and optimization tools

### Team Collaboration

1. **Shared Context**: Use project-wide tools for team alignment
2. **Progress Synchronization**: Regular progress report generation and sharing
3. **Dependency Management**: Proactive blocker identification and resolution
4. **Knowledge Sharing**: Document implementation briefs and architectural decisions

## Next Steps

<CardGroup cols={2}>
  <Card title="Integration Guide" icon="plug" href="/mcp/integration">
    Set up MCP server with your preferred AI development tools
  </Card>

  <Card title="Quick Start" icon="rocket" href="/quickstart#mcp-server-quickstart">
    Get your MCP server running in 5 minutes
  </Card>
</CardGroup>

<Card title="Complete InitRepo Platform" icon="globe" href="/platform/overview">
  See how MCP tools integrate with Web Platform and CLI for complete AI-first development
</Card>
