Skip to main content
Glama
us-all

openmetadata-mcp-server

by us-all

get-role

Retrieve role details by name in OpenMetadata. Filter by fields or include status to get exactly the information you need.

Instructions

Get role details by name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesRole name
fieldsNoComma-separated fields to include
includeNo

Implementation Reference

  • The getRole handler function that executes the tool logic. It extracts the 'name' param for the URL path and passes remaining query params (fields, include) as query string to the OpenMetadata API endpoint /roles/name/{name}.
    export async function getRole(params: z.infer<typeof getRoleSchema>) {
      const { name, ...query } = params;
      return omClient.get(`/roles/name/${encodeURIComponent(name)}`, query);
    }
  • The getRoleSchema defines the input validation schema for the get-role tool. It requires a 'name' (string) parameter, with optional 'fields' (comma-separated list) and 'include' (enum: non-deleted, deleted, all).
    export const getRoleSchema = z.object({
      name: z.string().describe("Role name"),
      fields: z.string().optional().describe("Comma-separated fields to include"),
      include: z.enum(["non-deleted", "deleted", "all"]).optional(),
    });
  • src/index.ts:371-371 (registration)
    Registration of the get-role tool in the MCP server. It registers the tool under the 'Roles' category with description 'Get role details by name', using getRoleSchema for input validation and wrapToolHandler(getRole) as the handler.
    tool("get-role", "Get role details by name", getRoleSchema.shape, wrapToolHandler(getRole));
  • src/index.ts:106-106 (registration)
    Import statement where getRoleSchema and getRole are imported from src/tools/access.ts into the registration file.
    import { listRolesSchema, listRoles, getRoleSchema, getRole, listPoliciesSchema, listPolicies, getPolicySchema, getPolicy } from "./tools/access.js";
Behavior2/5

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

No annotations exist, so the description must fully disclose behavior. It does not state read-only nature, default inclusion of deleted roles, auth requirements, or pagination. The 'include' parameter's effect is not explained, leaving the agent with significant ambiguity about the tool's behavior.

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?

The description is a single, front-loaded sentence with no fluff. It effectively conveys the core action. However, its extreme brevity sacrifices necessary detail, making it slightly less effective than a slightly longer but more informative description.

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?

Given the tool has 3 parameters, no output schema, and no annotations, the description is woefully incomplete. It does not explain parameter interactions, default behavior for 'include', response format, or how it differs from siblings like 'get-user-by-name'. An agent needs more context to invoke it correctly.

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

Parameters2/5

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

The input schema covers 67% of parameters with descriptions, but the description adds no further meaning. The 'include' parameter, which has an enum but no description in the schema, is not mentioned at all. The description fails to clarify how 'fields' or 'include' modify the request beyond the schema's bare minimum.

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

Purpose4/5

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

The description 'Get role details by name' clearly states the verb and resource, and specifies lookup by name. It distinguishes from siblings like 'list-roles' (which lists all roles) and other get-* tools that target different entities. However, it does not elaborate on what 'details' include or differentiate from other get-by-name tools, so it lacks perfect specificity for a 5.

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?

The description provides no guidance on when to use this tool versus alternatives. For instance, it does not mention that for a specific role name you should use this, while list-roles is for browsing all roles. No prerequisites or conditional contexts are given.

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