Skip to main content
Glama
us-all

openmetadata-mcp-server

by us-all

list-roles

Retrieve a paginated list of roles, with options to include related entities such as policies, teams, and users.

Instructions

List roles with pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNoComma-separated fields to include (e.g. 'policies,teams,users')
limitNoNumber of results per page
beforeNoCursor for backward pagination
afterNoCursor for forward pagination
includeNoInclude deleted entitiesnon-deleted

Implementation Reference

  • Handler function that calls omClient.get('/roles', params) to list roles from OpenMetadata API
    export async function listRoles(params: z.infer<typeof listRolesSchema>) {
      return omClient.get("/roles", params);
    }
  • Zod schema defining input parameters for list-roles: fields, limit (default 10), before, after cursors, and include filter
    export const listRolesSchema = z.object({
      fields: z.string().optional().describe("Comma-separated fields to include (e.g. 'policies,teams,users')"),
      limit: z.coerce.number().optional().default(10).describe("Number of results per page"),
      before: z.string().optional().describe("Cursor for backward pagination"),
      after: z.string().optional().describe("Cursor for forward pagination"),
      include: z.enum(["non-deleted", "deleted", "all"]).optional().default("non-deleted").describe("Include deleted entities"),
    });
  • src/index.ts:159-164 (registration)
    Local tool() helper that registers the tool in the ToolRegistry and conditionally registers with MCP server based on category enablement
    function tool(name: string, description: string, schema: any, handler: any): void {
      registry.register(name, description, currentCategory);
      if (registry.isEnabled(currentCategory)) {
        server.tool(name, description, schema, handler);
      }
    }
  • src/index.ts:370-371 (registration)
    Registration of list-roles tool with name, description, schema, and wrapped handler in the 'admin' category
    tool("list-roles", "List roles with pagination", listRolesSchema.shape, wrapToolHandler(listRoles));
    tool("get-role", "Get role details by name", getRoleSchema.shape, wrapToolHandler(getRole));
  • wrapToolHandler wraps handlers with error handling (redacts tokens, formats errors)
    export const wrapToolHandler = createWrapToolHandler({
      redactionPatterns: [/OPENMETADATA_TOKEN/i],
      errorExtractors: [
        {
          match: (error) => error instanceof WriteBlockedError,
          extract: (error) => ({
            kind: "passthrough",
            text: (error as WriteBlockedError).message,
          }),
        },
        {
          match: (error) => error instanceof OpenMetadataError,
          extract: (error) => {
            const err = error as OpenMetadataError;
            return {
              kind: "structured",
              data: {
                message: err.message,
                status: err.status,
                details: err.body,
              },
            };
          },
        },
      ],
    });
Behavior2/5

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

No annotations provided. Description lacks behavioral details such as authentication needs, rate limits, or pagination behavior beyond the name; the schema covers parameters but description adds minimal value.

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

Conciseness4/5

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

Single sentence is concise and includes key purpose; no wasted words but could be slightly more descriptive.

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

Completeness2/5

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

No output schema provided; description does not explain return format, ordering, or default behavior. Lacks critical context for an agent to invoke correctly.

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 description coverage is 100%, so baseline is 3. Description does not add meaning beyond the schema; it only reiterates pagination which is already implicit from the parameters.

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?

Description clearly states 'List roles with pagination', using a specific verb (list) and resource (roles), and distinguishes from sibling list-* tools by resource type.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus siblings like get-role or other list-* tools; no when/not-to-use conditions are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/us-all/openmetadata-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server