Skip to main content
The context-ask endpoint is an intelligent codebase question-answering system that combines semantic search with expert-level code analysis. Think of it as having a principal software engineer who instantly understands your entire codebase and can provide detailed, evidence-based answers with actual code snippets and precise implementation details.

What makes context ask unique

Unlike traditional documentation or search tools, Context Ask:
  • Provides evidence-based answers with actual code snippets and line numbers
  • Combines semantic search with graph-based repository knowledge
  • Analyzes code relationships and dependencies across your entire codebase
  • Delivers expert-level explanations with complete implementation details
  • Shows actual code proof for every claim, never just descriptions
  • Covers ALL aspects of complex technical questions comprehensively

API/MCP reference

Request format

{
  "tool": "context_ask",
  "parameters": {
    "input": "How does user authentication work in our FastAPI application? Show me the complete flow from login request to JWT token generation.",
    "repositories": ["backend/auth", "api/v1"],
    "session_id": "engineering-review-789"
  }
}

Parameters

ParameterTypeRequiredDescription
inputstringYesYour question or research query. Be specific and detailed for best results.
repositoriesarrayNoList of repository identifiers to scope the search. Format: org/repo
session_idstringNoUnique identifier to maintain context across multiple queries in a conversation.

Response format

{
  "response": "The authentication system works through a multi-stage process:\n\n## Stage 1: Login Validation\n\n```python\n# From backend/auth/controllers/auth.py, lines 23-35\n@router.post('/login')\nasync def login(credentials: LoginRequest):\n    user = await User.find_by_email(credentials.email)\n    if not user or not verify_password(credentials.password, user.password_hash):\n        raise HTTPException(401, 'Invalid credentials')\n    return generate_jwt_response(user)\n```\n\nThis code first retrieves the user by email (line 25), then verifies the password using bcrypt (lines 26-27)...\n\n## Stage 2: JWT Token Generation\n\n```python\n# From backend/auth/utils/jwt.py, lines 45-58\ndef generate_jwt_response(user: User) -> TokenResponse:\n    payload = {\n        'user_id': user.id,\n        'email': user.email,\n        'exp': datetime.utcnow() + timedelta(hours=24)\n    }\n    token = jwt.encode(payload, SECRET_KEY, algorithm='HS256')\n    return TokenResponse(access_token=token, token_type='bearer')\n```\n\nThe JWT generation creates a payload with user details and 24-hour expiration (lines 46-50)..."
}
  • Ask specific technical questions - “How does error handling work in the payment processing module?” rather than “Tell me about errors”
  • Request complete implementations - Ask for end-to-end flows, not just isolated functions
  • Focus on architectural patterns - Questions about how components interact yield comprehensive answers
  • Specify scope with repositories - Target relevant codebases for focused, accurate responses
  • Use session continuity - Maintain session_id for follow-up questions on related topics

Understanding authentication flow

{
  "input": "Show me the complete user authentication flow from request to response, including middleware, validation, and token generation with exact code implementations",
  "repositories": ["api/auth", "middleware/security"],
  "session_id": "auth-analysis"
}

Analyzing error handling patterns

{
  "input": "How are database connection errors handled across our microservices? Show me the specific error handling code and retry mechanisms",
  "repositories": ["microservices/user", "microservices/order", "shared/db"],
  "session_id": "error-analysis"
}

Exploring API design patterns

{
  "input": "What validation patterns do we use for API endpoints? Show me examples of request validation, schema definitions, and error responses with actual code",
  "repositories": ["api/v1", "api/v2", "shared/validators"]
}

Investigating performance optimizations

{
  "input": "How do we implement caching in our application? Show me the caching layers, cache key strategies, and invalidation mechanisms with complete code examples",
  "repositories": ["services/cache", "api/controllers"],
  "session_id": "performance-review"
}