Skip to main content
Glama

get_all_roles

Read-only

List all distinct role classifications in a repository with section counts and sample IDs, helping identify available roles before building role- or profile-based queries.

Instructions

v1.50+ — list every distinct role classification across the repo with per-role section counts and id samples. Companion to v1.46 get_all_tags. Sections without metadata.role are bucketed under 'unknown'. Use to discover what roles exist before constructing a role= or profile= query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository identifier
sample_sizeNoHow many section_ids to surface per role. 0 omits samples.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.118.0
  2. Removedv1.99.0
  3. First observedv1.66.3

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, indicating safe read-only behavior. The description adds valuable context: sections without metadata.role are bucketed under 'unknown', and results include per-role counts and sample IDs. This goes beyond what annotations provide, though it does not mention rate limits or pagination.

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?

The description is concise with four short sentences, each adding essential information: action + version, companion reference, unknown bucket behavior, and use case. It is front-loaded with the main action and avoids any fluff.

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

Completeness4/5

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

Given no output schema, the description adequately explains the return contents (counts, samples, unknown bucket) and purpose (query construction). The parameters are well-documented in the schema. It does not discuss error handling or pagination, but for a simple listing tool this is sufficient.

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

Parameters3/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 adds context about the output (counts, samples) which indirectly relates to the sample_size parameter. It does not repeat schema details but adds value by explaining the role discovery use case. No contradictions or misalignments.

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?

The description clearly states the tool's action: 'list every distinct role classification across the repo with per-role section counts and id samples'. It specifies the resource (roles), scope (across the repo), and additional details (counts, samples). It also distinguishes itself from a companion tool (get_all_tags), ensuring no confusion with siblings.

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?

The description explicitly says 'Use to discover what roles exist before constructing a role= or profile= query', providing a clear use case. It also references a companion tool (get_all_tags), hinting at a sibling relationship. However, it does not list alternative tools or explicitly state when not to use it.

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