Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Assign Territory to User

sf_assign_territory_to_user

Assign a Salesforce user to an Enterprise Territory Management territory to grant visibility into accounts within that territory. Specify username, territory API name, and optional role.

Instructions

Assigns a user to an Enterprise Territory Management territory via the UserTerritory2Association SObject. Users assigned to a territory get visibility into accounts in that territory.

username or userId: identify the user territoryName: DeveloperName of the Territory2 to assign roleInTerritory: optional role — 'Salesperson', 'Manager', or 'BusinessUser'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesSalesforce username to assign
territoryNameYesTerritory API name to assign user to
roleInTerritoryNoUser role within the territorySalesperson
Behavior4/5

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

Annotations already indicate a write operation with no destructive or idempotent behavior. The description adds useful context about the SObject used and the resulting visibility effect. It does not contradict annotations, so no score 1. The role value mismatch is more a parameter semantics issue than a behavioral trait.

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

Conciseness3/5

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

The description is relatively short and front-loads the action, but the parameter list duplicates schema info and includes inaccurate details. It is not as concise as it could be, and the inaccurate enum list adds noise.

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?

There is no output schema, yet the description does not mention return values, prerequisites (e.g., Enterprise Territory Management enabled, user/territory existence), or failure modes. The parameter contradictions further reduce completeness. For a write operation with no output schema, this is insufficient.

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?

Schema covers all parameters (100%), giving a baseline of 3. However, the description actively contradicts the schema: it lists roleInTerritory allowed values as 'Salesperson', 'Manager', 'BusinessUser' while the schema enum is 'Salesperson', 'AccountManager', 'Owner'. It also mentions 'userId' as an alternative to 'username', which does not exist as a parameter. This could mislead the agent into sending invalid values.

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 the tool assigns a user to an Enterprise Territory Management territory via the UserTerritory2Association SObject. It uses a specific verb and resource, and the inclusion of the SObject distinguishes it from other assign tools like sf_assign_skill_to_agent or sf_assign_presence_status.

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 clear context by explaining that assigned users gain visibility into accounts in the territory. It does not explicitly mention alternatives or exclusions, but the use case is well implied. This meets the 'clear context, no exclusions' level.

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