Skip to content
GitmoapAPIBeta
Knowledgespecs
GET/repositories/{repo_id}/specs

List a repository's indexed spec documents with their computed status

list_spec_docs
  • tree:read
    A token needs the tree:read scope: Browse repository trees and blobsGranted by mcp_agent, mcp_agent_write, read_api, read_repository, write_api, write_repository.Every operation this scope unlocks
  • Single-resource

    x-gitmoap-isolation: {"kind":"single_or_self_scoped"}

  • Paginated
    Pass the next_token a page returns to get the next one.

Lists the documents of the repository's specs corpus, as last indexed from its default branch, each with its status and the number of findings against it.

Parameters

Path
  • repo_idRepositoryId (string · uuid)The repository whose corpus is indexed
Query
  • kindstringoptionalFilter by document kind (open vocabulary: hub, domain, …)
  • statusstringoptionalFilter by declared status
  • posturestringoptionalFilter by conformance posture: declared or untyped
  • profilestringoptionalFilter by the profile that read the document
  • owner_group_idstringoptionalFilter by the group the frontmatter names as owner
  • stalebooleanoptionalFilter by whether the latest indexing reached the document
  • include_orphanedbooleanoptionalInclude documents whose file has disappeared (excluded by default)
  • searchstringoptionalMatch the title, summary or a doc_id substring
  • limitinteger · int32optionalPage size (1-100, default 20)
  • next_tokenstringoptionalPagination cursor

Responses

200A page of documents in doc_id orderapplication/json
  • itemsarray of object
    • block_countinteger · int32
    • byte_leninteger · int32
    • corpus_idCorpusId (string · uuid)
    • doc_idstring
    • finding_countinteger · int32
    • last_seen_shastring
    • pathstring
    • postureSpecPosturedeclareduntypedWhether a document claims to follow the spec format. A declared document carries gsf: 1 in its frontmatter and is checked in full; an untyped one made no claim and is never reported for not following it.
    • profilestring
    • record_countinteger · int32
    • staleboolean
    • stemstring
    • synced_atstring
    • titlestring
    • createdstring or nulloptional
    • depends_onarray of stringoptional
    • gsf_versioninteger · int32 or nulloptional
    • kindstring or nulloptional
    • last_reviewedstring or nulloptionalISO YYYY-MM-DD, verbatim from the frontmatter.
    • orphaned_atstring or nulloptionalWhen the file stopped being present in the repository. The record is kept rather than deleted, so an existing link still resolves and tells you it moved.
    • owner_group_idGroupId (string · uuid) or nulloptional
    • owner_principal_idPrincipalId (string · uuid) or nulloptional
    • parent_doc_idstring or nulloptional
    • part_of_doc_idstring or nulloptional
    • statusSpecStatusdraftreviewapprovedimplementedpartialsupersededlivingnoneor nulloptionalA document's declared lifecycle state. none is a real value rather than an absence: a document that declares status: none has said the question does not apply to it, which is a different fact from one that declared nothing.
    • status_notestring or nulloptional
    • summarystring or nulloptional
    • superseded_bystring or nulloptional
    • tagsarray of stringoptional
  • next_tokenstring or nulloptional
200 exampleSynthesized example
{
"items": [
{
"block_count": 6,
"byte_len": 26,
"corpus_id": "37f3d61c-4d05-48d2-9559-0f4839caa5b9",
"doc_id": "fa1c57bb-59d9-46a4-bfde-75da5426267c",
"finding_count": 1,
"last_seen_sha": "032d6f69d87a62b4252a8fdd529895d9a951e707",
"path": "path-1d82",
"posture": "declared",
"profile": "profile-be95",
"record_count": 5,
"stale": false,
"stem": "stem-25ff",
"synced_at": "2026-10-12T20:31:05Z",
"title": "Inline scalar newtypes but keep their brand"
}
],
"next_token": "next-token-e6e9"
}
400Unknown filter value or malformed cursorapplication/json
Error codes
  • BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-ed00",
"message": "Inline scalar newtypes but keep their brand"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
  • UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-46d8",
"message": "Pin a page's payload to the build that rendered it"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names it
  • PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-d486",
"message": "Label every synthesized example"
}
}
404Not found — or found and private, which is masked as absentapplication/json
Error codes
  • NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-a6d5",
"message": "Inline scalar newtypes but keep their brand"
}
}

CLI

gitmoap specs list-spec-docs

  • --repo-ididThe repository whose corpus is indexed (id or owner/repo path)
  • --include-orphanedflagoptionalInclude documents whose file has disappeared (excluded by default)
  • --kindstringoptionalFilter by document kind (open vocabulary: hub, domain, …)
  • --limitnumberoptionalPage size (1-100, default 20)
  • --next-tokenstringoptionalPagination cursor
  • --owner-group-idstringoptionalFilter by the group the frontmatter names as owner
  • --posturestringoptionalFilter by conformance posture: declared or untyped
  • --profilestringoptionalFilter by the profile that read the document
  • --searchstringoptionalMatch the title, summary or a doc_id substring
  • --staleflagoptionalFilter by whether the latest indexing reached the document
  • --statusstringoptionalFilter by declared status

Used in these guides