Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Create Custom Permission

sf_create_custom_permission
Idempotent

Create a custom permission to control feature access or conditional UI rendering. Check it in formulas or Apex, and assign via Permission Sets.

Instructions

Creates a Custom Permission that can be checked in formulas with $Permission.MyPerm or in Apex with FeatureManagement.checkPermission('MyPerm'). Assign custom permissions to users via Permission Sets. Use for feature flags, conditional UI rendering, or access gates.

fullName: permission API name (e.g. 'Can_Approve_Discounts') label: display label description: optional description requiredPermissions: other custom permissions required before this one can be granted

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesDisplay label
fullNameYesCustom permission API name, e.g. 'Can_Approve_Discounts'
descriptionNoDescription
requiredPermissionsNoOther custom permissions required by this one
Behavior4/5

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

Annotations already declare readOnly=false, idempotent=true, destructive=false. The description adds valuable context about how the permission is consumed (formulas/Apex) and that requiredPermissions establishes dependencies. No contradiction with annotations.

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 well-structured with two short paragraphs: one for purpose/usage and one for parameters. No redundant or filler content; every sentence earns its place.

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?

For a simple create operation with four fully documented parameters and appropriate annotations, the description is complete. It covers what the tool does, how to use it, parameter meaning, and downstream usage patterns, making it self-sufficient.

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% with descriptions for all four parameters, but the description adds a concrete example (fullName: 'Can_Approve_Discounts') and clarifies that requiredPermissions are a prerequisite. This enhances the schema semantics.

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 it creates a Custom Permission and explains how it is used via formulas or Apex. This distinguishes it from sibling tools like sf_create_permission_set and sf_create_field_level_security.

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?

It provides explicit use cases (feature flags, conditional UI, access gates) and notes that custom permissions are assigned via Permission Sets, which helps differentiate from related tools. However, it does not explicitly state when not to use this tool or compare alternatives directly.

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