Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Create User Role Hierarchy

sf_create_user_role_hierarchy
Idempotent

Create a Salesforce UserRole to control record visibility in role hierarchies. Optionally assign a parent role to place it beneath an existing role.

Instructions

Creates a new UserRole in the Salesforce Role Hierarchy. Roles control record visibility — users in higher roles can see records owned by users in lower roles (depending on OWD). Optionally set a parentRoleName to place this role beneath an existing role.

roleName: API name for the role (no spaces, used as DeveloperName) label: display name shown in Setup parentRoleName: API name of the parent role (omit for a top-level role) description: optional description

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesRole display label
roleNameYesRole API name
descriptionNoRole description
parentRoleNameNoParent role API name (omit for top-level)
caseAccessLevelNoCase access for subordinatesReadWrite
accountAccessLevelNoAccount access for subordinatesReadWrite
contactAccessLevelNoContact access for subordinatesReadWrite
opportunityAccessLevelNoOpportunity access for subordinatesReadWrite
mayForecastManagerShareNoGrant manager forecast sharing
Behavior3/5

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

Annotations already indicate readOnlyHint=false, openWorldHint=true, idempotentHint=true, and destructiveHint=false. The description adds useful domain context about how roles control record visibility, which goes beyond the annotations. Yet it does not disclose potential side effects (e.g., impact on existing users or permission requirements) or explain the meaning of access level parameters, leaving the behavioral picture incomplete.

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 well-structured with an initial concise summary followed by a parameter list. It is slightly longer than the minimal two-sentence ideal but every sentence adds value, particularly the roleName/label/parentRoleName clarifications. No redundant fluff.

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

Completeness3/5

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

With 9 parameters and 2 required, the description covers only 4 of them, but the schema provides full descriptions for all. The tool has no output schema, so return value expectations are not addressed. The description explains the core purpose but omits important context about how access level parameters affect the hierarchy and what happens if parentRoleName does not exist, leaving the description adequate but with clear gaps.

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 descriptions cover 100% of parameters, so baseline is 3. The description adds meaningful semantics for key parameters: roleName is 'API name (no spaces, used as DeveloperName)', label is 'display name shown in Setup', and parentRoleName can be 'omit for a top-level role'. This clarifies usage beyond the schema's terse descriptions, though access-level parameters receive no additional explanation.

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 clearly states the action ('Creates a new UserRole') and the resource ('in the Salesforce Role Hierarchy'), which is specific and unambiguous. However, it does not explicitly distinguish this tool from sibling tools like 'sf_create_role_hierarchy' or 'sf_create_role', so it falls short of 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 Guidelines3/5

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

The description explains when this tool is relevant by describing role hierarchy and OWD visibility, and it mentions the optional parentRoleName to place a role under an existing one. However, it does not explicitly state when to use this tool versus alternatives, nor does it provide exclusions or prerequisites beyond the implied hierarchy context.

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/semwalajay83-sem/salesforce-metadata-mcp'

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