Find the right capability.
DISCOVER AgentDefinition
WHERE tags CONTAINS "research"
ORDER BY published_at DESC
LIMIT 25Choose an entry type, match a tag, and start with the most recently published records.
MARS-QL
A small, expressive language for discovering complete registry records. Start with a capability, refine the context, and keep the publisher, payload, and history within reach.
A bounded query filters a catalog into useful results. Ordering and pagination keep the response inspectable.
01 / queries
Every query begins with DISCOVER. Use one of the fourteen entry types or the wildcard, then add only the conditions you need.
DISCOVER AgentDefinition
WHERE tags CONTAINS "research"
ORDER BY published_at DESC
LIMIT 25Choose an entry type, match a tag, and start with the most recently published records.
DISCOVER ModelDefinition
WHERE attestation_count >= 3
ORDER BY attestation_count DESC
LIMIT 25Filter by attestation count, then inspect the credentials and their issuers in each returned record.
DISCOVER *
WHERE human_root = "did:oas:example:hmr:publisher"
ORDER BY published_at DESC
LIMIT 25Match optional stored human-root lineage across all supported entry types.
DISCOVER ServiceDefinition
WHERE bond_amount >= 100
AND status = "active"
ORDER BY bond_amount DESC
LIMIT 25Require an active service and a registry bond amount above a chosen threshold.
Examples describe filters, not quality guarantees. Three attestations need not mean three independent issuers, and a bond amount represents the registry’s configured bond policy.
02 / language
Conditions combine with AND. Comparisons and set membership cover the core questions without turning a registry into an open-ended SQL engine.
Filter supported fields including tags, publisher, lifecycle, version, lineage, bond amount, and nested item metadata. Choose explicit ordering and a bounded result count.
The grammar intentionally omits SQL tables, projections, joins, CTEs, OR, aggregation, and subqueries. Each result is a complete MarsEntry, ready to inspect or resolve.
OFFSET accepts an opaque continuation cursor. It is not a numeric row offset.
<query> ::= 'DISCOVER' <entry-type>
[ 'WHERE' <conditions> ]
[ 'ORDER BY' <ordering> ]
[ 'LIMIT' <integer> ]
[ 'OFFSET' <string> ]
<conditions> ::= <condition> { 'AND' <condition> }
<condition> ::= <field> <operator> <value>
| <field> 'CONTAINS' <value>
| <field> 'CONTAINS_ALL' <value-list>
| <field> 'CONTAINS_ANY' <value-list>
| <field> 'IN' <value-list>
<operator> ::= '=' | '!=' | '>' | '>=' | '<' | '<='03 / pagination
Send your MARS-QL text to POST /v1/discover/marsql in the query field.
Read entries and totalCount. The page also reports hasMore and an optional cursor.
When hasMore is true, pass the returned cursor as the same query’s quoted OFFSET.
Cursors are signed, expire, and are bound to the query. Restart the query if its cursor is no longer valid.