Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Create Sharing Rule

sf_create_sharing_rule
Idempotent

Create a Salesforce sharing rule to extend org-wide defaults by granting access to specific roles, groups, or queues based on criteria or ownership.

Instructions

Creates a Sharing Rule for a Salesforce object. Sharing Rules extend the OWD by automatically sharing records with users who meet criteria (criteria-based) or who own records (ownership-based). Use to give specific roles/groups access to records they wouldn't normally see based on OWD.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesDisplay label
ruleNameYesSharing rule developer name
ruleTypeNocriteria: share based on field values. ownership: share based on record owner.criteria
sharedToYesWho receives the sharing
objectNameYesObject API name, e.g. 'Account', 'Opportunity'
sharedFromNoFor ownership-based rules: whose records are shared
accessLevelNoAccess level grantedRead
criteriaItemsNoFor criteria-based rules: conditions that trigger sharing
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=true, and openWorldHint=true. The description adds useful conceptual detail on how sharing rules operate (automatic sharing based on criteria or ownership) but does not disclose implementation-side behaviors such as permission requirements or what happens on duplicate rule names. It complements annotations without contradiction.

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?

Two sentences, front-loaded with the core action, then concise context. No wasted words; every sentence adds value.

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 the schema fully documents parameters (8 params, nested objects, enums), the description provides essential conceptual backing and usage context. It does not explain return values, but no output schema exists and creation tools typically confirm success. Slight gap: lacks prerequisite details like object-level permissions, but overall sufficient for a tool of this complexity.

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 the schema carries detailed parameter info. The description enhances understanding of ruleType by explaining criteria-based vs ownership-based sharing, and clarifies sharedTo semantics. However, it doesn't add meaning to most other parameters beyond what schema already states.

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?

Specific verb+resource: 'Creates a Sharing Rule for a Salesforce object.' It clearly distinguishes from other creation tools by explaining the underlying concept (extending OWD) and the two types (criteria-based, ownership-based). No tautology, accurately reflects the tool's purpose.

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?

Provides a clear use case: 'Use to give specific roles/groups access to records they wouldn't normally see based on OWD.' However, it does not explicitly mention alternatives like permission sets or when not to use sharing rules, though the context implies it's for OWD-driven sharing needs.

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