Documentation Index
Fetch the complete documentation index at: https://www.greptile.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Custom Context
Pull Requests
Code Reviews
4 tools for managing coding patterns and organizational standardslist_custom_context
List organization custom context entries.Parameters:
type (optional): CUSTOM_INSTRUCTION or PATTERN
greptileGenerated (optional): Filter by Greptile-generated content
limit (optional): Maximum results (1-100, default 20)
offset (optional): Skip results for pagination (default 0)
Response:{
"customContexts": [
{
"id": "memory_9a7fe8b3-4cc6-4c1a-9c4c-8b7f3d2e1a6c",
"type": "CUSTOM_INSTRUCTION",
"body": "Use async/await instead of Promise.then() for better readability",
"status": "ACTIVE",
"scopes": {"AND": [{"operator": "MATCHES", "field": "filepath", "value": "**/*.js"}]},
"metadata": {},
"evidenceCount": 15,
"commentsCount": 8,
"createdAt": "2024-12-15T10:30:00Z"
}
],
"total": 20
}
get_custom_context
Get detailed custom context information.Parameters:
customContextId (required): Custom context ID
Response:{
"customContext": {
"id": "ctx_123",
"type": "CUSTOM_INSTRUCTION",
"body": "Always use proper error handling",
"status": "ACTIVE",
"metadata": {},
"scopes": {"AND": []},
"createdAt": "2024-01-01T00:00:00Z",
"linkedComments": [
{
"id": "comment_456",
"filePath": "src/utils.js",
"mergeRequestId": "mr_789"
}
]
}
}
search_custom_context
Search custom context by content.Parameters:
query (required): Search term
limit (optional): Maximum results (1-50, default 10)
Response:{
"customContexts": [...],
"query": "error handling",
"total": 3
}
create_custom_context
Create new custom context.Parameters:
type (optional): CUSTOM_INSTRUCTION or PATTERN (default CUSTOM_INSTRUCTION)
body (optional): Context content
scopes (optional): Boolean expression defining where context applies
status (optional): ACTIVE, INACTIVE, or SUGGESTED (default ACTIVE)
metadata (optional): Additional metadata object
Scopes Example:{
"scopes": {
"AND": [
{
"operator": "MATCHES",
"field": "filepath",
"value": "**/*.js"
}
]
}
}
3 tools for accessing PR data and metadata across repositorieslist_merge_requests / list_pull_requests
List merge/pull requests.Parameters:
name (optional): Repository name (owner/repo format)
remote (optional): github or gitlab
defaultBranch (optional): Repository default branch
remoteUrl (optional): Self-hosted instance URL
state (optional): open, closed, or merged
limit (optional): Maximum results (1-100, default 20)
offset (optional): Skip results for pagination (default 0)
Note: Repository parameters must be provided together (name, remote, defaultBranch) or omitted entirely.Response:{
"mergeRequests": [
{
"id": "mr_123",
"number": 45,
"title": "Fix authentication bug",
"state": "open",
"isDraft": false,
"authorLogin": "developer",
"repository": {
"name": "owner/repo",
"remote": "github"
},
"stats": {
"changedFiles": 3,
"additions": 45,
"deletions": 12
},
"commentsCount": 2,
"reviewsCount": 1,
"createdAt": "2024-01-01T00:00:00Z"
}
],
"total": 15
}
get_merge_request
Get detailed pull request information.Parameters:
name (required): Repository name (owner/repo format)
remote (required): github or gitlab
defaultBranch (required): Default branch
remoteUrl (optional): Self-hosted instance URL
prNumber (required): Pull request number
Response:{
"mergeRequest": {
"number": 45,
"title": "Fix authentication bug",
"description": "This PR fixes the auth issue...",
"state": "open",
"isDraft": false,
"authorLogin": "developer",
"branches": {
"source": "feature/auth-fix",
"target": "main"
},
"stats": {
"changedFiles": 3,
"additions": 45,
"deletions": 12
},
"labels": ["bug", "authentication"],
"repository": {
"name": "owner/repo",
"url": "https://github.com/owner/repo"
},
"greptileComments": [
{
"commentId": "comment_789",
"filePath": "src/auth.js",
"createdAt": "2024-01-01T00:00:00Z"
}
],
"codeReviews": [
{
"id": "review_456",
"status": "COMPLETED",
"createdAt": "2024-01-01T00:00:00Z",
"completedAt": "2024-01-01T01:00:00Z"
}
]
}
}
Get pull request comments.Parameters:
name (required): Repository name
remote (required): github or gitlab
defaultBranch (required): Default branch
remoteUrl (optional): Self-hosted instance URL
prNumber (required): Pull request number
greptileGenerated (optional): Filter Greptile comments
addressed (optional): Filter by addressed status
Response:{
"comments": [
{
"id": "comment_123",
"commentId": "github_comment_456",
"body": "Consider using async/await here",
"authorLogin": "greptile-bot",
"filePath": "src/utils.js",
"lineStart": 45,
"lineEnd": 47,
"greptileGenerated": true,
"addressed": false,
"createdAt": "2024-01-01T00:00:00Z",
"linkedMemory": {
"id": "memory_789",
"type": "CUSTOM_INSTRUCTION",
"body": "Always use async/await for promises"
}
}
],
"repository": "owner/repo",
"prNumber": 45,
"total": 3
}
3 tools for managing review lifecycle and resultslist_code_reviews
List code reviews.Parameters:
name (optional): Repository name
remote (optional): github or gitlab
defaultBranch (optional): Default branch
remoteUrl (optional): Self-hosted instance URL
prNumber (optional): Filter by pull request
status (optional): PENDING, REVIEWING_FILES, GENERATING_SUMMARY, COMPLETED, FAILED, SKIPPED
limit (optional): Maximum results (1-100, default 20)
offset (optional): Skip results for pagination (default 0)
Response:{
"codeReviews": [
{
"id": "review_123",
"status": "COMPLETED",
"createdAt": "2024-01-01T00:00:00Z",
"completedAt": "2024-01-01T01:00:00Z",
"metadata": {},
"mergeRequest": {
"id": "mr_456",
"prNumber": 45,
"title": "Fix authentication bug",
"sourceRepoUrl": "https://github.com/owner/repo",
"repository": {
"name": "owner/repo"
}
}
}
],
"total": 8
}
get_code_review
Get detailed code review.Parameters:
codeReviewId (required): Code review ID
Response:{
"codeReview": {
"id": "review_123",
"body": "## Summary\n\nThis PR fixes authentication...",
"status": "COMPLETED",
"createdAt": "2024-01-01T00:00:00Z",
"completedAt": "2024-01-01T01:00:00Z",
"metadata": {},
"mergeRequest": {
"id": "mr_456",
"prNumber": 45,
"title": "Fix authentication bug",
"sourceRepoUrl": "https://github.com/owner/repo",
"description": "This PR fixes...",
"authorLogin": "developer",
"repository": {
"id": "repo_789",
"name": "owner/repo",
"remote": "github",
"remoteUrl": "https://github.com/owner/repo"
}
}
}
}
trigger_code_review
Start new code review.Parameters:
name (required): Repository name
remote (required): github or gitlab
defaultBranch (required): Default branch
branch (optional): Working branch
remoteUrl (optional): Self-hosted instance URL
prNumber (required): Pull request number
Response:{
"success": true,
"message": "Code review triggered successfully",
"repository": {
"name": "owner/repo",
"remote": "github"
},
"prNumber": 45
}
Error Responses
Standard JSON-RPC error format:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32601,
"message": "Method not found"
}
}
Common Error Codes:
-32700: Parse error
-32600: Invalid request
-32601: Method not found
-32602: Invalid parameters
-32603: Internal error
-32000: Server error (includes authentication and authorization failures)