Overview
This page documents direct MCP integration with the gloria.dev MCP server, not everyday agent workflows. It is the exception that names the tool surface, argument names, and payload shapes for integrators wiring the server directly. All calls run in the caller’s active organization. For the broader product surface, see Coding Standards and MCP Tools.
register_standard
Purpose: Ensure the project has a standards row and optionally record the rendered stamp just written into CLAUDE.md or AGENTS.md.
| Name | Type | Required | Description |
|---|---|---|---|
projectSlug | string | Yes | Project slug. |
renderedStamp | number | No | Standards version just rendered into the agent file. |
Behavior:
- Requires
inventory:write. - Returns
403when access is denied and404when the organization or project is missing. - Creates standards version
1when no standards row exists yet. - Records
renderedStampwhen provided so drift checks can flag stale renders. - Returns the current standard with
versionandrenderedStamp.
{
"projectSlug": "acme-api",
"renderedStamp": 7
}put_rule
Purpose: Create or update one coding rule in the project’s standards library.
| Name | Type | Required | Description |
|---|---|---|---|
projectSlug | string | Yes | Project slug. |
ruleId | string | Yes | Stable kebab-case rule slug. |
instruction | string | Yes | Imperative rule text. |
authority | RuleAuthoritySchema | Yes | One of enforced, stated, or observed. |
scope | RuleScopeSchema | No | Optional scope object with globs? and packages?, each an array of strings. |
evidence | RuleEvidenceSchema | Yes | Evidence object with sources: string[]. |
status | StandardsEntityStatusSchema | No | One of active, stale, or retired. Defaults to active. |
Behavior:
- Requires
inventory:write. - Returns
403when access is denied and404when the organization or project is missing. - Auto-registers the standards row if needed.
- Preserves the existing
idandcreatedAtfields on updates. - Defaults
scopeto{}andstatustoactive. - Bumps the project’s standards version.
- Returns the updated rule and the new
standardsVersion.
{
"projectSlug": "acme-api",
"ruleId": "all-d1-access-via-daos",
"instruction": "Access D1 through DAOs only.",
"authority": "enforced",
"scope": {
"packages": ["packages/core/src"]
},
"evidence": {
"sources": ["packages/core/src/standards-schema.ts"]
},
"status": "active"
}put_snippet
Purpose: Create or update one canonical snippet using placeholder-ized code for a reusable pattern.
| Name | Type | Required | Description |
|---|---|---|---|
projectSlug | string | Yes | Project slug. |
snippetId | string | Yes | Stable kebab-case snippet slug. |
language | string | Yes | Snippet language. |
name | string | Yes | Snippet name. |
description | string | Yes | Snippet description. |
code | string | Yes | Placeholder-ized canonical code. |
placeholders | string[] | No | Placeholder names. Defaults to []. |
ruleIds | string[] | No | Rule slugs the snippet embodies. |
status | StandardsEntityStatusSchema | No | One of active, stale, or retired. Defaults to active. |
Behavior:
- Requires
inventory:write. - Returns
403when access is denied and404when the organization or project is missing. - Resolves linked rule slugs before any write.
- Returns
404withunknown rule: <slug>when any rule slug does not exist. - Replaces the linked rules wholesale and bumps the project’s standards version.
- Returns the provided rule slugs in
linkedRulesalongside the snippet and newstandardsVersion.
{
"projectSlug": "acme-api",
"snippetId": "d1-dao",
"language": "ts",
"name": "D1 DAO",
"description": "Canonical DAO shape for D1 access.",
"code": "export class D1Dao {\n // TODO: add query methods\n}",
"placeholders": ["query methods"],
"ruleIds": ["all-d1-access-via-daos"],
"status": "active"
}find_snippets
Purpose: Find canonical snippets for a given language and search query.
| Name | Type | Required | Description |
|---|---|---|---|
projectSlug | string | Yes | Project slug. |
language | string | Yes | Snippet language. |
query | string | Yes | Search text. |
Behavior:
- Requires
inventory:read. - Returns
403when access is denied and404when the organization or project is missing. - Searches in this order: exact match, then name contains, then fuzzy token search across name and description.
- Returns an empty list when nothing matches.
- Includes
ruleIdsfor each result and resolves them from the linked rules. - Returns snippet records with
snippetId,language,name,description,code,placeholders, andruleIds.
{
"projectSlug": "acme-api",
"language": "ts",
"query": "D1 DAO"
}get_standards
Purpose: Fetch the project’s current rules, standards version, and rendered stamp.
| Name | Type | Required | Description |
|---|---|---|---|
projectSlug | string | Yes | Project slug. |
Behavior:
- Requires
inventory:read. - Returns
403when access is denied and404when the organization or project is missing. - Returns the current rules together with
versionandrenderedStamp. - Returns
version: nullwhen no standards row exists yet.
{
"projectSlug": "acme-api"
}report_check_run
Purpose: Record a Coding Standards check run and reconcile its findings with the drift ledger.
| Name | Type | Required | Description |
|---|---|---|---|
projectSlug | string | Yes | Project slug. |
kind | CheckKindSchema | Yes | One of diff, audit, or metadata. |
triggeredBy | CheckTriggerSchema | Yes | One of pr, manual, or cron. |
standardsVersionChecked | number | Yes | Standards version that the run checked. |
scopeDetail | CheckScopeDetailSchema | No | Optional scope object with diffRange? and prRef?. |
startedAt | number | Yes | Unix seconds when the run started. |
completedAt | number | No | Unix seconds when the run completed. Defaults to now when omitted. |
findings | array | Yes | Finding objects with type, optional ruleId, optional snippetId, optional file, optional line, and detail. |
Behavior:
- Requires
inventory:write. - Returns
403when access is denied and404when the organization or project is missing. - Accepts finding
typevaluesrule_violation,rule_stale,render_stale,snippet_stale, andunattributed_duplication. - Requires
ruleIdforrule_violationandrule_stale. - Requires
snippetIdforsnippet_staleandunattributed_duplication. - Requires neither
ruleIdnorsnippetIdforrender_stale. - Keys findings on
(type, ruleId, snippetId, file). - Dedupes re-reported keys.
- The run auto-resolves open findings that stay in scope for its kind but do not reappear in the report.
- Keeps dismissed findings sticky.
- Uses
diffruns to auto-resolverule_violationandunattributed_duplication,metadataruns to auto-resolverule_staleandrender_stale, andauditruns to auto-resolve all finding types. - Returns the check run id plus the numbers of inserted, resolved, and deduped findings.
{
"projectSlug": "acme-api",
"kind": "diff",
"triggeredBy": "pr",
"standardsVersionChecked": 12,
"scopeDetail": {
"prRef": "pr-123"
},
"startedAt": 1710000000,
"findings": [
{
"type": "rule_violation",
"ruleId": "all-d1-access-via-daos",
"file": "packages/core/src/readers.ts",
"line": 42,
"detail": "Direct D1 access bypasses the DAO."
}
]
}get_drift_status
Purpose: Return the project’s current drift summary.
| Name | Type | Required | Description |
|---|---|---|---|
projectSlug | string | Yes | Project slug. |
Behavior:
- Requires
inventory:read. - Returns
403when access is denied and404when the organization or project is missing. - Returns
openFindingsByType,openFindingsTotal,lastCheck,standardsVersion, andrenderedStamp. - Returns
lastCheckwithid,kind,startedAt, andcompletedAtfrom the most recent check run. - Reads the current project state through the core drift-status DAO.
{
"projectSlug": "acme-api"
}Next
- Domain Model for the underlying schema shapes.
- Coding Standards for the product overview.