Skip to main content
Glama

Cirra AI Salesforce Admin MCP Server

metadata_update

Idempotent

Update one or more Salesforce metadata elements of a specified type, such as flows, validation rules, or custom labels. Two modes: (1) pass metadata with the full object(s); (2) for a large single record such as a Flow, pass a small patch (JSON Patch) plus the fullName of the record to modify — the current object is fetched and patched server-side, so you do not have to resend the whole object. REPLACE SEMANTICS for composite types (ApprovalProcess, Layout, Flow, StandardValueSet, GlobalValueSet) when using metadata: the payload overwrites the entire component — omitted children (e.g. approvalStep, layoutSections, value entries) are removed, so metadata_read first, merge your change, and send the full payload. Using patch avoids this because the diff is applied to the current object.

Input Schema

NameRequiredDescriptionDefault
typeYesThe metadata type.
patchNoA partial update expressed in the `JSON Patch` format (RFC 6902): an array of operations applied to the current metadata of the record named by `fullName`. Use this instead of `metadata` for large records (e.g. Flows) to avoid resending the whole object. Array elements may be addressed by their identity instead of their position: `name` where the child has one (e.g. `/decisions/My_Decision`), otherwise `fullName` (e.g. GlobalValueSet `/customValue/Gamma`, CustomObject `/fields/My_Field__c`); numeric indices always work and are safer for deeper paths. Repeating children are always arrays on read, including a single element — always include `/0/` (e.g. `/testPoints/1/assertions/0/conditions/0/rightValue/stringValue`).
upsertNoWhether to upsert the metadata. If true, the metadata will be upserted (created if it does not yet exist). If false, the metadata will be updated. For Flow updates this should be true so a new version is created.
sf_userNo(optional) Salesforce username to identify the connection to use. Omit this to use the current default connection.
fullNameNoThe full name of the single record to modify. Required when using `patch`; ignored when using `metadata`.
metadataNoThe array of metadata records to update, each replacing the whole object. Each record must include at least a 'fullName' property and other required fields for the type. See instructions for details. Omit when using `patch`.
cirra_ai_teamNo(optional) Cirra team ID or name that owns the Salesforce connection to use for this call. Must be provided together with 'sf_user'. Use it to run against a specific team's connection without changing your default team — e.g. to keep separate chats on Salesforce orgs in different teams. Omit it when this call carries the context_handle from cirra_ai_init, which names the team for the conversation. A user with more than one place to work (several teams, or a team and a personal account) must pass either the context_handle or 'cirra_ai_team' + 'sf_user'.
context_handleNo(recommended) The conversation context handle returned by cirra_ai_init in this conversation. Pass the exact context_handle value from the most recent cirra_ai_init result so this call runs against the team and Salesforce connection selected for this conversation. A user with more than one place to work (several Cirra AI teams, or a team and a personal account) must pass either this handle or 'cirra_ai_team' + 'sf_user'; a call with neither is refused.

Output Schema

NameRequiredDescriptionDefault
messageYes
resultsNo
successYes
warningNo
errorCodeNo
errorCountNo
resultCountNo
artifactTypeNo
requestCountNo
skippedCountNo
successCountNo
appliedMetadataNoThe metadata payload that was actually sent to Salesforce for this operation (post-normalization/defaulting), so you can verify it matches what was intended without a separate read.
artifactCategoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / cirra_ai_team / description
      Previous value: -"(optional) Cirra team ID or name that owns the Salesforce connection to use for this call. Must be provided together with 'sf_user'. Use it to run against a specific team's connection without changing your default team — e.g. to keep separate chats on Salesforce orgs in different teams. Omit to use your current/default team."New value: +"(optional) Cirra team ID or name that owns the Salesforce connection to use for this call. Must be provided together with 'sf_user'. Use it to run against a specific team's connection without changing your default team — e.g. to keep separate chats on Salesforce orgs in different teams. Omit it when this call carries the context_handle from cirra_ai_init, which names the team for the conversation. A user with more than one place to work (several teams, or a team and a personal account) must pass either the context_handle or 'cirra_ai_team' + 'sf_user'."
    • addedInput schema / properties / context_handle
      Added value: +{
      +  "description": "(recommended) The conversation context handle returned by cirra_ai_init in this conversation. Pass the exact context_handle value from the most recent cirra_ai_init result so this call runs against the team and Salesforce connection selected for this conversation. A user with more than one place to work (several Cirra AI teams, or a team and a personal account) must pass either this handle or 'cirra_ai_team' + 'sf_user'; a call with neither is refused.",
      +  "type": "string"
      +}
    • addedInput schema / properties / fullName
      Added value: +{
      +  "description": "The full name of the single record to modify. Required when using `patch`; ignored when using `metadata`.",
      +  "type": "string"
      +}
    • changedInput schema / properties / metadata / description
      Previous value: -"The array of metadata records to update. Each record must include at least a 'fullName' property and other required fields for the type. See instructions for details."New value: +"The array of metadata records to update, each replacing the whole object. Each record must include at least a 'fullName' property and other required fields for the type. See instructions for details. Omit when using `patch`."
    • addedInput schema / properties / patch
      Added value: +{
      +  "description": "A partial update expressed in the `JSON Patch` format (RFC 6902): an array of operations applied to the current metadata of the record named by `fullName`. Use this instead of `metadata` for large records (e.g. Flows) to avoid resending the whole object. Array elements may be addressed by their identity instead of their position: `name` where the child has one (e.g. `/decisions/My_Decision`), otherwise `fullName` (e.g. GlobalValueSet `/customValue/Gamma`, CustomObject `/fields/My_Field__c`); numeric indices always work and are safer for deeper paths. Repeating children are always arrays on read, including a single element — always include `/0/` (e.g. `/testPoints/1/assertions/0/conditions/0/rightValue/stringValue`).",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "from": {
      +        "description": "For move and copy operations only: a JSON Pointer path specifying the source",
      +        "type": "string"
      +      },
      +      "op": {
      +        "description": "The operation to perform",
      +        "enum": [
      +          "add",
      +          "remove",
      +          "replace",
      +          "move",
      +          "copy",
      +          "test"
      +        ],
      +        "type": "string"
      +      },
      +      "path": {
      +        "description": "An enhanced JSON Pointer path specifying where the change should be applied.",
      +        "type": "string"
      +      },
      +      "value": {
      +        "description": "The value to add, replace, or test. Set to null for move and copy operations"
      +      }
      +    },
      +    "required": [
      +      "op",
      +      "path"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / upsert / description
      Previous value: -"Whether to upsert the metadata. If true, the metadata will be upserted (created if it does not yet exist). If false, the metadata will be updated."New value: +"Whether to upsert the metadata. If true, the metadata will be upserted (created if it does not yet exist). If false, the metadata will be updated. For Flow updates this should be true so a new version is created."
    • changedInput schema / required
      Previous value: -[
      -  "type",
      -  "metadata"
      -]New value: +[
      +  "type"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "appliedMetadata": {
      +      "additionalProperties": true,
      +      "description": "The metadata payload that was actually sent to Salesforce for this operation (post-normalization/defaulting), so you can verify it matches what was intended without a separate read.",
      +      "properties": {},
      +      "type": "object"
      +    },
      +    "artifactCategory": {
      +      "type": "string"
      +    },
      +    "artifactType": {
      +      "type": "string"
      +    },
      +    "errorCode": {
      +      "type": "string"
      +    },
      +    "errorCount": {
      +      "type": "number"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "requestCount": {
      +      "type": "number"
      +    },
      +    "resultCount": {
      +      "type": "number"
      +    },
      +    "results": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "skippedCount": {
      +      "type": "number"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    },
      +    "successCount": {
      +      "type": "number"
      +    },
      +    "warning": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "message"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / cirra_ai_team
      Added value: +{
      +  "description": "(optional) Cirra team ID or name that owns the Salesforce connection to use for this call. Must be provided together with 'sf_user'. Use it to run against a specific team's connection without changing your default team — e.g. to keep separate chats on Salesforce orgs in different teams. Omit to use your current/default team.",
      +  "type": "string"
      +}
  3. Added
  4. Removed
  5. Changed1 schema field changed
    • changedInput schema / properties / metadata / items / additionalProperties
      Previous value: -{}New value: +true
  6. Added
  7. Removed
  8. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and destructiveHint=false; the description goes well beyond by disclosing REPLACE SEMANTICS for ApprovalProcess, Layout, Flow, StandardValueSet and GlobalValueSet — omitted children are removed — and by explaining that `patch` avoids that data loss. That is the single most consequential behavior for this tool and it is stated plainly rather than left to discovery.

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?

It is dense but front-loaded: purpose first, then the two modes, then the destructive replace warning. The closing clause ('Using `patch` avoids this because the diff is applied to the current object') restates a point already made earlier in the paragraph, which is the one avoidable redundancy.

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?

For an 8-parameter mutating tool with an output schema, the description covers mode selection, the destructive replace behavior for composite types, and the recovery workflow. Minor gaps remain — nothing about permissions or how partial failures across multiple `metadata` records are reported — but nothing essential to invoking it correctly is missing.

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%, so the schema carries the field-level detail (including the JSON Patch element structure and the identity-vs-index path rules). The description still adds decision-level semantics absent from the schema: which of `metadata` vs `patch` to supply, and that `fullName` pairs with `patch` while being ignored with `metadata`.

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 opens with a specific verb and resource ('Update one or more Salesforce metadata elements of a specified type') and immediately names concrete element types (flows, validation rules, custom labels). It also defines two distinct invocation modes, which lets an agent distinguish this tool from metadata_create/read/delete without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

It explicitly routes the agent between alternatives: mode (1) `metadata` for full objects, mode (2) `patch` for a large single record such as a Flow because 'you do not have to resend the whole object'. It further states a prerequisite workflow ('metadata_read first, merge your change, and send the full payload') for composite types, which is exactly the when-and-how guidance an agent needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources