/ask
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
input
string
Yes
Technical question about your codebase. More specific questions yield better results with exact code evidence
repositories
array
No
List of repository identifiers to focus the search. Format: org/repo
session_id
string
No
Unique identifier to maintain context across related engineering questions
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\[email protected]('/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)..."
}
Recommended Query Strategies
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
Last updated
Was this helpful?