Skip to main content
Complete reference for all tools provided by the Greptile MCP server.
This reference is sourced from Greptile’s official MCP documentation. Parameters are inputs you provide when calling a tool; responses are the data returned.

Tools by Category

4 tools for managing coding patterns and organizational standards

list_custom_context

List your organization’s custom context entries.
ParameterTypeRequiredDescription
typestringNoCUSTOM_INSTRUCTION or PATTERN
greptileGeneratedbooleanNoFilter by Greptile-generated content
limitnumberNoMax results (1-100, default 20)
offsetnumberNoSkip results for pagination
{
  "customContexts": [
    {
      "id": "memory_9a7fe8b3-4cc6-4c1a-9c4c-8b7f3d2e1a6c",
      "type": "CUSTOM_INSTRUCTION",
      "body": "Use async/await instead of Promise.then()",
      "status": "ACTIVE",
      "scopes": {"AND": [{"operator": "MATCHES", "field": "filepath", "value": "**/*.js"}]},
      "evidenceCount": 15,
      "commentsCount": 8,
      "createdAt": "2024-12-15T10:30:00Z"
    }
  ],
  "total": 20
}

get_custom_context

Get detailed information about a specific custom context entry.
ParameterTypeRequiredDescription
customContextIdstringYesCustom context ID
{
  "customContext": {
    "id": "ctx_123",
    "type": "CUSTOM_INSTRUCTION",
    "body": "Always use proper error handling",
    "status": "ACTIVE",
    "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.
ParameterTypeRequiredDescription
querystringYesSearch term
limitnumberNoMax results (1-50, default 10)
{
  "customContexts": [...],
  "query": "error handling",
  "total": 3
}

create_custom_context

Create a new custom context entry.
ParameterTypeRequiredDescription
typestringNoCUSTOM_INSTRUCTION or PATTERN (default: CUSTOM_INSTRUCTION)
bodystringNoContext content
scopesobjectNoWhere context applies (see format below)
statusstringNoACTIVE, INACTIVE, or SUGGESTED
metadataobjectNoAdditional metadata
Scopes Format:
{
  "scopes": {
    "AND": [
      {"operator": "MATCHES", "field": "filepath", "value": "**/*.js"}
    ]
  }
}

Error Responses

All tools return errors in standard JSON-RPC format:
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32601,
    "message": "Method not found"
  }
}
CodeMeaning
-32700Parse error
-32600Invalid request
-32601Method not found
-32602Invalid parameters
-32603Internal error (includes auth failures)

Quick Reference

ToolCategoryPurpose
list_custom_contextCustom ContextList all coding patterns
get_custom_contextCustom ContextGet pattern details
search_custom_contextCustom ContextSearch patterns
create_custom_contextCustom ContextCreate new pattern
list_merge_requestsPull RequestsList PRs
get_merge_requestPull RequestsGet PR details
list_merge_request_commentsPull RequestsGet PR comments
list_code_reviewsCode ReviewsList reviews
get_code_reviewCode ReviewsGet review details
trigger_code_reviewCode ReviewsStart new review
search_greptile_commentsCommentsSearch feedback