Skip to content

Orbit

Orbit exposes GitLab.com’s experimental Knowledge Graph API through six read-only MCP tools. It is available only when the server connects to https://gitlab.com and the Enterprise/Premium catalog is enabled with GITLAB_ENTERPRISE=true or --enterprise.

RequirementValue
GitLab hosthttps://gitlab.com
CatalogEnterprise/Premium
Meta-tool modegitlab_orbit with six actions
Individual modeSix gitlab_orbit_* tools
Write behaviorRead-only

Self-managed GitLab instances do not register Orbit tools, even when the Enterprise/Premium catalog is enabled.

ActionIndividual toolPurpose
statusgitlab_orbit_statusCheck Orbit service health and component status
schemagitlab_orbit_schemaInspect the graph ontology and optionally expand node definitions
toolsgitlab_orbit_toolsDiscover the live Orbit query manifest
dslgitlab_orbit_dslRetrieve the Orbit query DSL schema or LLM grammar
querygitlab_orbit_queryExecute a read-only Knowledge Graph query object
graph_statusgitlab_orbit_graph_statusInspect indexing status for a namespace, project, or full path
  1. Call gitlab_orbit with action: "status" to confirm the service is available.
  2. Call action: "schema" to inspect graph domains, nodes, and relationships.
  3. Call action: "tools" before action: "query" to obtain the live query schema served by GitLab.com.
  4. (Optional) Call action: "dsl" to retrieve the Orbit query DSL schema or LLM grammar.
  5. Pass a JSON query object to action: "query" with response_format set to raw or llm.

The query parameter on the query action is a JSON object whose query_type selects one of four variants. The diagram below summarizes the smallest accepted shape for each variant. A Mermaid graph TD is the right tool because the four variants share a single query_type discriminator and only diverge on the sibling keys — a tree makes the discriminants and required fields legible at a glance.

graph TD
    Q["QueryInput<br/>(gitlab_orbit_query)"] --> QT{"query_type"}
    QT -->|"traversal"| TR["node OR nodes<br/>+ entity, node_ids/filters/id_range<br/>+ relationships?, columns?, order_by?, limit?, cursor?"]
    QT -->|"aggregation"| AG["nodes[]<br/>+ aggregations[] (function, target, alias)<br/>+ group_by?, aggregation_sort?"]
    QT -->|"neighbors"| NB["node (bounded)<br/>+ neighbors.node<br/>+ direction?, rel_types?"]
    QT -->|"path_finding"| PF["nodes[] (>=2, bounded)<br/>+ path {type, from, to, max_depth: 1..3, rel_types?}"]

The recommended pattern is to discover the live schema first (schema, then optionally dsl), then execute a typed query through query. A sequenceDiagram is the right tool because the steps involve four distinct actors (AI client, MCP server, GitLab.com, the Orbit indexer) and the response boundaries matter — the LLM should not assume the schema returned by dsl is stable.

sequenceDiagram
    participant LLM as AI Client
    participant MCP as MCP Server
    participant GL as GitLab.com API
    participant IDX as Orbit Indexer

    LLM->>MCP: gitlab_orbit_schema (response_format=llm)
    MCP->>GL: GET /api/v4/orbit/schema
    GL-->>MCP: ontology (nodes, edges, versions)
    MCP-->>LLM: schema text

    LLM->>MCP: gitlab_orbit_dsl (response_format=llm)
    MCP->>GL: GET /api/v4/orbit/schema/dsl
    GL-->>MCP: query DSL / LLM grammar
    MCP-->>LLM: DSL text

    LLM->>MCP: gitlab_orbit_query (query={query_type, ...})
    MCP->>GL: POST /api/v4/orbit/query
    GL->>IDX: resolve node_ids / filters
    IDX-->>GL: indexed rows
    GL-->>MCP: rows / aggregations / paths
    MCP-->>LLM: result + markdown
{
"tool": "gitlab_orbit",
"arguments": {
"action": "status"
}
}
{
"tool": "gitlab_orbit",
"arguments": {
"action": "schema",
"params": {
"expand": ["Project", "User"],
"response_format": "llm"
}
}
}
{
"tool": "gitlab_orbit",
"arguments": {
"action": "tools"
}
}
{
"tool": "gitlab_orbit",
"arguments": {
"action": "dsl",
"params": {
"response_format": "llm"
}
}
}
{
"tool": "gitlab_orbit",
"arguments": {
"action": "query",
"params": {
"query": {
"query_type": "traversal",
"node": {
"id": "p",
"entity": "Project",
"filters": {
"full_path": { "op": "starts_with", "value": "gitlab-org/" }
},
"columns": ["id", "full_path"]
}
},
"response_format": "llm"
}
}
}
{
"tool": "gitlab_orbit",
"arguments": {
"action": "graph_status",
"params": {
"project_id": 278964,
"response_format": "llm"
}
}
}

Returns cluster health and backend component status. Use to verify Orbit is available for your token and project.

Example: See above.

Returns the Orbit graph ontology, including schema version, domains, node summaries, and edges. Use expand to get detailed node definitions. Supports response_format (raw or llm).

Example: See above.

tools — Discover the Orbit tool manifest

Section titled “tools — Discover the Orbit tool manifest”

Returns the live Orbit MCP tool manifest. Use before query to discover supported query shapes and parameter schemas.

Example: See above.

dsl — Retrieve the Orbit query DSL schema or LLM grammar

Section titled “dsl — Retrieve the Orbit query DSL schema or LLM grammar”

Returns the Orbit query DSL as a JSON Schema (raw) or LLM grammar (llm). Useful for advanced query construction and LLM integration.

Example: See above.

Runs a read-only Knowledge Graph query. The query parameter must match the schema from tools. Supports response_format (raw or llm).

Example: See above.

Returns graph indexing status for a namespace, project, or full path. Use to check if a project is indexed and ready for queries.

Example: See above.

In meta-tool mode, action parameter schemas are available through MCP resources:

ResourcePurpose
gitlab://tools/gitlab_orbit.statusParameters for service health checks
gitlab://tools/gitlab_orbit.schemaParameters for ontology inspection
gitlab://tools/gitlab_orbit.toolsParameters for query manifest discovery
gitlab://tools/gitlab_orbit.dslParameters for DSL schema/grammar
gitlab://tools/gitlab_orbit.queryParameters for Knowledge Graph queries
gitlab://tools/gitlab_orbit.graph_statusParameters for indexing status checks

These resources remain available with CAPABILITY_SURFACE=full or minimal, regardless of META_PARAM_SCHEMA mode.

Orbit ships with a build-tag-gated live test suite at test/e2e/orbit/live_test.go that exercises each handler against the real https://gitlab.com/api/v4/orbit/* endpoints. The suite has four entry points and 41 subtests covering all six handlers, the canonical Query DSL shapes, fixture-based smoke tests, and the full DSL feature surface. The orchestrator make test-e2e-gitlab-com provisions kg-fixtures and security-fixtures projects in your namespace (idempotent), waits for the Orbit indexer to catch up, then runs the tests:

Terminal window
# Add a Personal Access Token (api scope) to .env first
echo 'GITLAB_COM_TOKEN=glpat-...' >> .env
# Default namespace is plens1; override with ORBIT_FIXTURES_NAMESPACE
make test-e2e-gitlab-com ORBIT_FIXTURES_NAMESPACE=acme-research
# When fixtures are already provisioned, run only the tests
GITLAB_COM_TOKEN=glpat-... \
go test -tags orbitlive -count=1 -v -timeout 300s ./test/e2e/orbit/

See Orbit live test fixtures for the fixture layout, the scripts/setup-orbit-fixtures.sh reproducer, and the indexer caveat (transient error state is normal and the tests are informational, not strict equality).