Skip to main content
Glama

Cirra AI Salesforce Admin MCP Server

metadata_read

Read-onlyIdempotent

Read full details for one or more Salesforce metadata elements of a specified type, such as flows, validation rules, or approval processes

Input Schema

NameRequiredDescriptionDefault
typeYesThe metadata type
formatNoResponse shape for the component files. `json` (default) is the current Metadata SOAP / specialized-describe result, unchanged. `xml` returns each component as Metadata API retrieve files keyed by metadata-format path (`objects/Foo__c.object`). `source` returns DX source-format files keyed by path relative to a package directory (`main/default/objects/Foo__c/fields/Bar__c.field-meta.xml`); the client prepends its own `force-app/`. `xml` and `source` come from a Metadata API retrieve plus `@salesforce/source-deploy-retrieve` conversion — they are not reconstructed from the JSON. Requesting a child (`CustomField:Obj.Fld`) yields only that child; requesting a parent (`CustomObject:Obj`) yields the object plus all children, same as `sf project retrieve start`.json
sf_userNo(optional) Salesforce username to identify the connection to use. Omit this to use the current default connection.
pageSizeNo(optional) Maximum number of records to return per page when the response requires pagination, including the first page. If omitted, the first page is a short preview and later pages use an automatically calculated size.
fullNamesYesThe full name(s) of the metadata elements to read.
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
formatNo
messageYes
recordsNo
resultsNo
successYes
warningNo
errorCodeNo
apiVersionNoAPI version used for the retrieve. Match this to sourceApiVersion in sfdx-project.json.
componentsNoPresent when format is xml or source. One entry per requested fullName, with metadataXml or sourceFiles. Missing components have an empty file map and warning "not found".
errorCountNo
resultCountNo
artifactTypeNo
requestCountNo
skippedCountNo
successCountNo
artifactCategoryNo
packageDirectoryNoDX package directory name the client should prepend to source paths. Always force-app.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 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 / format
      Added value: +{
      +  "default": "json",
      +  "description": "Response shape for the component files. `json` (default) is the current Metadata SOAP / specialized-describe result, unchanged. `xml` returns each component as Metadata API retrieve files keyed by metadata-format path (`objects/Foo__c.object`). `source` returns DX source-format files keyed by path relative to a package directory (`main/default/objects/Foo__c/fields/Bar__c.field-meta.xml`); the client prepends its own `force-app/`. `xml` and `source` come from a Metadata API retrieve plus `@salesforce/source-deploy-retrieve` conversion — they are not reconstructed from the JSON. Requesting a child (`CustomField:Obj.Fld`) yields only that child; requesting a parent (`CustomObject:Obj`) yields the object plus all children, same as `sf project retrieve start`.",
      +  "enum": [
      +    "json",
      +    "xml",
      +    "source"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / pageSize / description
      Previous value: -"(optional) Maximum number of records to return per page when the response requires pagination. If omitted, page size is calculated automatically."New value: +"(optional) Maximum number of records to return per page when the response requires pagination, including the first page. If omitted, the first page is a short preview and later pages use an automatically calculated size."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "apiVersion": {
      +      "description": "API version used for the retrieve. Match this to sourceApiVersion in sfdx-project.json.",
      +      "type": "string"
      +    },
      +    "artifactCategory": {
      +      "type": "string"
      +    },
      +    "artifactType": {
      +      "type": "string"
      +    },
      +    "components": {
      +      "description": "Present when format is xml or source. One entry per requested fullName, with metadataXml or sourceFiles. Missing components have an empty file map and warning \"not found\".",
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "errorCode": {
      +      "type": "string"
      +    },
      +    "errorCount": {
      +      "type": "number"
      +    },
      +    "format": {
      +      "enum": [
      +        "json",
      +        "xml",
      +        "source"
      +      ],
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "packageDirectory": {
      +      "description": "DX package directory name the client should prepend to source paths. Always force-app.",
      +      "type": "string"
      +    },
      +    "records": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "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
    • addedInput schema / properties / pageSize
      Added value: +{
      +  "description": "(optional) Maximum number of records to return per page when the response requires pagination. If omitted, page size is calculated automatically.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
  6. Added
  7. Removed
  8. First observed

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is fully covered. The description adds no behavior beyond that—nothing about pagination, partner/child recursion, or connection requirements (those live only in the schema's parameter descriptions).

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?

A single front-loaded sentence with concrete examples and no filler. It is efficient, though the examples consume space that could have gone to sibling differentiation.

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?

Output schema and 100% parameter coverage mean the description does not need to explain returns or inputs, and the annotations carry the safety profile. What remains missing is the routing information an agent needs to pick this over the other metadata_* tools.

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?

With schema_description_coverage at 100%, the schema fully documents all seven parameters, including the rich format/cirra_ai_team/context_handle semantics. The description only echoes 'specified type' and 'one or more' elements, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (read full details for metadata elements of a specified type) and grounds it with concrete examples such as flows, validation rules, and approval processes. It does not, however, distinguish itself from siblings like metadata_describe or metadata_list, which read similar data.

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

Usage Guidelines2/5

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

The description never says when to choose this over metadata_list (listing) or metadata_describe (describing shape). The closest it comes is 'full details', leaving the agent to infer the boundary from sibling names alone.

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