Style Guide & Governance — MCP Tools
13 tools in the Style Guide & Governance group of the Routebase MCP server.
delete_custom_style_guide_rule
Delete one of the organization's own style guide rules. Every project stops being checked against it. Requires organization context.
Required scope: specs:delete
| Parameter | Type | Required | Description |
|---|---|---|---|
ruleId |
string | Yes | Public ID (GUID) of the rule |
get_governance_config
Get the organization's governance thresholds and the five weights the quality score is built from. Requires organization context.
Required scope: org:manage-governance
No parameters.
get_governance_score
Get the quality score. Scope 'org' (default) averages across the organization's specs with the trend and a per-spec breakdown. Scope 'spec' needs specId and recalculates that spec's score on the spot — that writes a new snapshot and may raise alerts, so it is not a free read. Requires project context for scope 'spec'.
Required scope: specs:read
| Parameter | Type | Required | Description |
|---|---|---|---|
scope |
string | No (default "org") |
What to score: 'org' (default) or 'spec' |
specId |
string | No | Public ID (GUID) of the API specification — required for scope 'spec' |
get_org_style_guide_settings
Get whether the style guide is enabled for the organization and whether it blocks publishing, together with the rules grouped by category and how many are active in each. Requires organization context.
Required scope: org:manage-governance
No parameters.
list_custom_style_guide_rules
List the organization's own style guide rules with their conditions. The ruleId of each ('custom-
Required scope: specs:read
No parameters.
list_governance_alerts
List the organization's governance alerts — quality drops, breaking-change spikes, stale drafts, blocked publishes. Unresolved only by default; capped at the 100 most recent. Requires organization context.
Required scope: specs:read
| Parameter | Type | Required | Description |
|---|---|---|---|
unresolvedOnly |
boolean | No (default true) |
Only alerts nobody has resolved yet (default true) |
list_project_style_guide_rules
List the style guide rules as they apply in this project: the built-in default, the organization override, the project override and the effective severity of each, plus the organization's custom rules. Use get_style_guide_rules for the organization-level view. Requires project context.
Required scope: specs:read
No parameters.
manage_custom_style_guide_rule
Create or change one of the organization's own style guide rules. A rule tests one field of one target: target is 'specification', 'endpoint' or 'schema'; conditionField depends on it (endpoint: path, summary, description, operationId, method — schema: name, description, properties — specification: name, version, description, serverUrl, contactEmail, licenseIdentifier); conditionType is 'regex', 'contains', 'equals' or 'exists', and conditionValue is required for all but 'exists'. 'create' needs name, category ('naming', 'completeness', 'bestPractice', 'security', 'structural'), target, conditionType and conditionField. 'update' changes only what you pass. Deleting is delete_custom_style_guide_rule. Requires organization context.
Required scope: specs:write
| Parameter | Type | Required | Description |
|---|---|---|---|
action |
string | Yes | What to do: 'create' or 'update' |
ruleId |
string | No | Public ID (GUID) of the rule — required for 'update' |
name |
string | No | Rule name, 2–100 characters — required for 'create' |
description |
string | No | Optional description of what the rule checks |
category |
string | No | Category: 'naming', 'completeness', 'bestPractice', 'security' or 'structural' — required for 'create' |
severity |
string | No | Severity: 'off', 'info', 'warning' or 'error' (defaults to warning) |
target |
string | No | What it applies to: 'specification', 'endpoint' or 'schema' — required for 'create' |
conditionType |
string | No | How it tests: 'regex', 'contains', 'equals' or 'exists' — required for 'create' |
conditionField |
string | No | Which field it tests — required for 'create', valid values depend on target |
conditionValue |
string | No | What it tests against — required unless conditionType is 'exists' |
isEnabled |
boolean | No | For 'update': whether the rule is active |
manage_org_style_guide_rule
Override style guide rules for the whole organization, or drop the overrides. 'set' needs ruleId and at least one of severity ('off', 'info', 'warning', 'error') and namingConvention ('kebab-case', 'camelCase', 'PascalCase', 'lowercase', or 'default' to drop that axis). 'reset' removes the whole override for one rule. 'bulk_set' takes rulesJson, a JSON array of {ruleId, severity} — severity only, and it validates every entry before writing any. Projects can still override on top. Requires organization context.
Required scope: org:manage-governance
| Parameter | Type | Required | Description |
|---|---|---|---|
action |
string | Yes | What to do: 'set', 'reset' or 'bulk_set' |
ruleId |
string | No | Rule ID — required for 'set' and 'reset' |
severity |
string | No | Severity: 'off', 'info', 'warning' or 'error' |
namingConvention |
string | No | Naming convention: 'kebab-case', 'camelCase', 'PascalCase', 'lowercase', or 'default' to drop the override |
rulesJson |
string | No | For 'bulk_set': a JSON array of {"ruleId":"…","severity":"…"} |
manage_project_style_guide_rule
Override a style guide rule for this project, or drop the override again. 'set' needs at least one of severity ('off', 'info', 'warning' or 'error' — 'off' is how a rule is switched off) and namingConvention ('kebab-case', 'camelCase', 'PascalCase', 'lowercase', or 'default' to drop just that axis). 'reset' removes the whole project override, both axes, and falls back to the organization's setting. Rule IDs come from list_project_style_guide_rules. Requires project context.
Required scope: specs:write
| Parameter | Type | Required | Description |
|---|---|---|---|
ruleId |
string | Yes | Rule ID, e.g. 'path-must-be-kebab-case' or 'custom- |
action |
string | Yes | What to do: 'set' or 'reset' |
severity |
string | No | Severity: 'off', 'info', 'warning' or 'error' |
namingConvention |
string | No | Naming convention for rules that support one: 'kebab-case', 'camelCase', 'PascalCase', 'lowercase', or 'default' to drop the override |
resolve_governance_alert
Mark a governance alert as resolved. This cannot be undone, and it does not fix what raised the alert. Alert IDs come from list_governance_alerts. Requires organization context.
Required scope: specs:read
| Parameter | Type | Required | Description |
|---|---|---|---|
alertId |
string | Yes | Public ID (GUID) of the alert |
update_governance_config
Change the organization's governance thresholds. Only what you pass is changed — with one exception: the five score weights are all-or-nothing and must add up to exactly 100. Pass all five together or none; a partial set is rejected here, because the server would silently ignore it. Requires organization context.
Required scope: org:manage-governance
| Parameter | Type | Required | Description |
|---|---|---|---|
minQualityScore |
integer | No | Quality score below which a spec raises an alert (0–100) |
alertOnBreakingChanges |
boolean | No | Raise an alert when a version introduces breaking changes |
staleDraftDays |
integer | No | After how many days an untouched draft counts as stale |
minDocCoverage |
integer | No | Minimum documentation coverage in percent (0–100) |
styleGuideWeight |
integer | No | Weight of the style guide in the score — all five weights or none, summing to 100 |
documentationWeight |
integer | No | Weight of documentation in the score |
securityWeight |
integer | No | Weight of security in the score |
consistencyWeight |
integer | No | Weight of consistency in the score |
architectureHealthWeight |
integer | No | Weight of architecture health in the score |
publishRequiresImpactAcknowledgement |
boolean | No | Require publishers to acknowledge the impact analysis before publishing |
update_org_style_guide_config
Turn the organization's style guide on or off, and decide whether violations block publishing. Only what you pass is changed. Requires organization context.
Required scope: org:manage-governance
| Parameter | Type | Required | Description |
|---|---|---|---|
isEnabled |
boolean | No | Whether the style guide is applied at all |
enforceOnPublish |
boolean | No | Whether violations block publishing a version |