Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Create OmniStudio Calculation Procedure

sf_create_calculation_procedure
Idempotent

Create calculation procedures that orchestrate matrices, formulas, and logic for complex pricing, eligibility, and scoring engines.

Instructions

Creates a Calculation Procedure that orchestrates multi-step calculations using Calculation Matrices, formulas, and logic steps.

steps array — each step has:

  • name: step identifier

  • type: MatrixLookup (call a matrix), Formula (expression), Condition (branch), Assignment (set variable)

  • matrixName: required for MatrixLookup steps

  • expression: required for Formula/Condition steps

  • inputMap: maps procedure variables to step inputs

  • outputMap: maps step outputs back to procedure variables

Use Calculation Procedures to build complex pricing engines, eligibility calculators, or multi-factor scoring systems.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYes
stepsNoProcedure steps
descriptionNo
procedureNameYesAPI name of the Calculation Procedure
Behavior3/5

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

The annotations already declare readOnly=false, destructive=false, idempotent=true, and openWorld=true. The description adds functional detail but does not disclose additional behavioral traits like deployment requirements, overwrite behavior, or authorization needs. It is minimally adequate given existing annotations.

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 structured into three parts: a clear definition, a bullet-like breakdown of steps, and a usage note. Each sentence serves a purpose, and the formatting aids readability, though it is slightly longer than strictly necessary.

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?

The tool has a nested steps array and no output schema. The description thoroughly covers the steps but omits guidance on top-level parameters like 'label' and 'description'. The step type mismatch with the schema creates a notable gap, and the overall description is not fully self-contained.

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?

The schema covers 50% of parameters with descriptions, and the description compensates by thoroughly explaining the steps array structure. However, there is a significant mismatch: the description mentions step types 'MatrixLookup', 'Formula', and 'Assignment' while the schema enum is 'Matrix', 'Expression', 'Loop', and 'Condition'. This inconsistency could mislead the agent into passing invalid enum 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?

The description clearly states the tool creates a Calculation Procedure using a specific verb and resource. It distinguishes from siblings like sf_create_calculation_matrix and sf_create_integration_procedure by emphasizing orchestration of multi-step calculations and providing concrete use cases.

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?

The description provides clear usage context with the sentence 'Use Calculation Procedures to build complex pricing engines, eligibility calculators, or multi-factor scoring systems.' It does not explicitly name alternatives or state when not to use it, but the use cases give strong guidance.

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