Style Guide & Governance — MCP Tools
Style guide rules and naming conventions. This page documents the Style Guide & Governance group of the Routebase MCP server, with the scope and the parameters of each tool.
A session that stages its tools advertises this group once the agent calls enable_toolset with the slug style-guide. Full-access keys, scoped keys and OAuth sessions see every tool they are allowed to call without that step.
delete_custom_style_guide_rule
Delete one of the organization's own style guide rules. Every project stops being checked against it. Use this to remove an own rule; to switch a built-in one off use manage_org_style_guide_rule. 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. Use this to read thresholds and weights; to change them use update_governance_config. 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. Use this for the score itself; for the thresholds and weights behind it use get_governance_config. 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. Use this to read the settings; to change them use update_org_style_guide_config. Requires organization context.
Required scope: org:manage-governance
No parameters.
get_project_rating_settings
Read the API rating settings that apply in the active project: the effective values, and as defaults the ones it inherits from the organization. overrideCount says how many it set itself. To change them use update_project_rating_settings. Requires project context.
Required scope: projects:read
No parameters.
get_rating_settings
Read the organization's API rating settings: facet weights, each check with its points and whether it is on, and the grade thresholds, each with its built-in default. To change them use update_rating_settings. 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. Use this to browse alerts; to mark one resolved use resolve_governance_alert. 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) and option (see the rule's supportedOptions). '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 |
option |
string | No | Option of a rule that has one, e.g. 'cursor', or 'default' to drop it |
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) and option (see the rule's supportedOptions). 'reset' removes the whole project override, all 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 |
option |
string | No | Option of a rule that has one, e.g. 'cursor', or 'default' to drop it |
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. Use this to change thresholds and weights; to read the current ones use get_governance_config. 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. Use this to switch the style guide on or off; to change a single rule use manage_org_style_guide_rule. 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 |
update_project_rating_settings
Replace the active project's API rating settings, in the format of update_rating_settings. Pass the values the project should have: what equals the organization's is not stored, what is left out is inherited, '{}' follows the organization again. inheritTarget false makes the target in settings the project's own, or none when absent. With previewSpecId nothing is saved and that specification is rated instead. Requires project context.
Required scope: projects:write
| Parameter | Type | Required | Description |
|---|---|---|---|
settings |
string | Yes | JSON as for update_rating_settings |
inheritTarget |
boolean | No (default true) |
true (default) keeps the organization's target grade |
previewSpecId |
string | No | Public ID (GUID) of a specification to rate instead of saving |
update_rating_settings
Replace the organization's API rating settings. Pass every change to the built-in rating: whatever is left out returns to its default, '{}' resets all. Weights 0-100, points 1-20, grades descending, target grade a-d with mode 'warn' or 'block' (block refuses a publish below it). With previewSpecId nothing is saved and that specification is rated under the settings instead (needs project context). Requires organization context.
Required scope: org:manage-governance
| Parameter | Type | Required | Description |
|---|---|---|---|
settings |
string | Yes | JSON, e.g. {"facets":[{"id":"design","weight":30,"checks":[{"id":"pagination","enabled":false,"points":8}]}],"grades":{"a":90,"b":75,"c":60,"d":45},"target":{"grade":"b","mode":"block"}} |
previewSpecId |
string | No | Public ID (GUID) of a specification to rate instead of saving |