Skip to main content
Glama

kb_rules_list_for_context

Read-onlyIdempotent

Lists the rule documents that apply to a given authoring context — the conventions your authoring should follow. Returns a list of MCP resource URIs in canonical order: tenant rules first, then project rules, then group rules (one per group, in the order you supplied). Each entry carries the rule doc body inline by default (body_md) so one call gives you everything you need — no separate resources/read fetch required. Pass include_bodies=false to get URIs only. Empty list means no rules apply at this scope. Rules are advisory, not machine-enforced; agents are expected to read and apply them.

Input Schema

NameRequiredDescriptionDefault
group_slugsNoOptional — groups the authored doc would be tagged with. Adds one URI per group that has rules linked, in the order supplied.
tenant_slugNoTenant slug to target. Required when your token grants several workspaces; omit when it grants one. If you omit it with several, the refusal names your default workspace; call kb_tenants_list to see every workspace the token grants.
project_slugNoOptional — project the authoring is scoped to. Adds the project rules URI when the project has one linked.
include_bodiesNoWhen true (default), each entry carries the rule doc markdown body inline under body_md. Pass false for a URI-only response when you already have the bodies cached.

Output Schema

NameRequiredDescriptionDefault
rulesYes
contextYes
recommended_skillsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely non-obvious behavior: canonical ordering (tenant → project → one per group in supplied order), inline body_md by default so no separate resources/read is needed, and the important caveat that rules are advisory rather than machine-enforced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five tight sentences; the purpose and return shape lead, then ordering, then the default/override, then edge-case semantics. Every sentence carries decision-relevant information and none repeat structured fields verbatim.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description doesn't need to explain return values, and it still covers the things schema can't: ordering guarantees, empty-result meaning, the read-versus-fetch optimization, and the advisory nature of the rules. Nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by stating include_bodies defaults to true and what it replaces, and by clarifying that group_slugs produces one URI per group in the order supplied. It doesn't restate tenant_slug's refusal behavior, but the schema already covers that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Lists the rule documents that apply to a given authoring context") plus the return shape (list of MCP resource URIs). The follow-up clause "the conventions your authoring should follow" disambiguates it from kb_rules_get/set, which manage rules rather than resolve them for authoring.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear context for use (authoring a doc that needs applicable conventions) and explicit guidance on the include_bodies=false case for agents that already cached the bodies. It also explains what an empty list means. It never names kb_rules_get as the alternative for reading a single rule, so routing between sibling rule tools is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.