Contact Us 1-800-596-4880

MuleSoft MCP Server Tool Reference

MuleSoft MCP Server provides tools for developing agent networks, building applications, creating connectors, managing deployments, governing APIs, and more. Each tool accepts specific parameters to automate tasks across the Anypoint Platform. Use these tools to accelerate development workflows, streamline governance, and gain operational insights into your integrations.

Some MuleSoft MCP Server tools are available only in the Anypoint Code Builder IDE or Connector Builder.

See Create a Connected App for information about which tools require specific permission scopes.

Command Summary

Category Tool Anypoint Code Builder Only Connector Builder Only Required Permission Scopes

Agent Network Development

configure_agent_network_yaml

Yes

No

None

create_agent_network_project

Yes

No

None

deploy_agent_network

Yes

No

None

publish_agent_network_assets

Yes

No

None

Application Development

create_and_manage_assets

No

No

  • Exchange: Exchange Administrator

  • Exchange: Exchange Contributor

  • Exchange: Exchange Creator

create_and_manage_metadata

Yes

No

None

create_api_spec_project

No

No

None

create_MCP_server

No

No

Anypoint Code Builder: Mule Developer Generative AI User

create_mule_project

No

No

None

generate_api_spec

No

No

Anypoint Code Builder: Mule Developer Generative AI User

generate_mule_flow

No

No

Anypoint Code Builder: Mule Developer Generative AI User

generate_munit_test

Yes

No

Anypoint Code Builder: Mule Developer Generative AI User

get_topics_agent_actions_metadata_instructions

Yes

No

None

implement_api_spec

Yes

No

Exchange: Exchange Viewer

mock_api_spec

Yes

No

None

modify_munit_test

Yes

No

Anypoint Code Builder: Mule Developer Generative AI User

open_project

Yes

No

None

run_local_mule_application

No

No

None

search_asset

No

No

Exchange: Exchange Viewer

test_connection

Yes

No

None

validate_project

Yes

No

None

Connector Development

uc_create_connector_workflow

No

Yes

None

uc_generate_api_spec

No

Yes

None

uc_generate_connector

No

Yes

None

DataWeave Development

dataweave_create_documentation

No

No

None

dataweave_create_project

No

No

None

dataweave_create_sample_data

No

No

None

dataweave_get_module_metadata

No

No

None

dataweave_get_project_metadata

No

No

None

dataweave_open_project

No

No

None

dataweave_run_script_tool

No

No

None

Application Management

create_and_manage_api_instances

No

No

API Manager: Manage API Configuration

deploy_mule_application

No

No

  • Exchange: Exchange Viewer

  • Runtime Manager: View Connected Applications

  • Runtime Manager: Create Applications

  • Runtime Manager: Read Runtime Fabrics

list_api_instances

No

No

API Manager: View APIs Configuration

list_applications

No

No

  • Runtime Manager: Monitoring Viewer

  • Runtime Manager: View Connected Applications

  • Runtime Manager: Read Applications

  • Runtime Manager: Read Runtime Fabrics

update_mule_application

No

No

  • General: View Organization

  • Runtime Manager: View Connected Applications

  • Runtime Manager: Create Applications

Governance

add_governance_ruleset

Yes

No

None

list_governance_rulesets

Yes

No

None

validate_api_against_ruleset

Yes

No

None

Policy Management

get_flex_gateway_policy_example

No

No

None

manage_api_instance_policy

No

No

API Manager: Manage Policies

manage_flex_gateway_policy_project

No

No

None

Usage and Insights

get_platform_insights

No

No

  • Runtime Manager: Monitoring Viewer

  • Runtime Manager: Read Runtime Fabrics

  • Runtime Manager: CloudHub Network Viewer

  • General: Usage Viewer

  • General: View Organization

  • API Manager: View APIs Configuration

get_reuse_metrics

No

No

  • Runtime Manager: Monitoring Viewer

  • Runtime Manager: View Connected Applications

  • Runtime Manager: Read Runtime Fabrics

  • Runtime Manager: CloudHub Network Viewer

  • API Manager: View APIs Configuration

  • General: Usage Viewer

add_governance_ruleset

Add a governance ruleset from Anypoint Exchange to your project. Use the search_asset tool to find a ruleset that matches an assetId, groupId, and version from user-provided criteria. The search_asset tool uses searchQuery='user' criteria and assetFilters=ruleset to return a ruleset meeting those criteria. Then, this tool adds the ruleset as a dependency to your project.

Available only in Anypoint Code Builder.

Parameter Description Required?

assetId

The ID of the asset.

Yes

groupId

Group ID of the asset in Anypoint Exchange.

Yes

version

Version of the asset, for example, 1.4.0.

Yes

Example request
{
  "name": "add_governance_ruleset",
  "arguments": {
    "assetId": "api-governance-ruleset",
    "groupId": "com.mulesoft.governance",
    "version": "1.4.0"
  }
}
Example response
{
  "success": true,
  "assetId": "api-governance-ruleset",
  "groupId": "com.mulesoft.governance",
  "version": "1.4.0",
  "dependencyAdded": true,
  "projectPath": "/Users/developer/projects/pet-store-api",
  "message": "Governance ruleset added successfully to project"
}

configure_agent_network_yaml

Modifies an agent network project YAML file. The tool can replace placeholder YAML created from a template with values generated from user prompts and guided setup (mode='configure'). Or, the tool can make minor changes to a preconfigured agent network YAML file (mode='edit'). The LLM determines the appropriate mode value from user prompts and guided setup.

Available only in Anypoint Code Builder.

Parameter Description Required?

mode

The operation to perform on the agent network project YAML. Valid values are configure and edit.

For example, use configure to set up a custom agent network tailored to your environment, discover agent network components, or scaffold a new agent network. Use edit to make minor changes to a configured agent network YAML file, such as renaming an existing agent.

Yes

prompt

Prompt from the user containing instructions to the agent.

Yes

Example request (configure mode)
{
  "name": "configure_agent_network_yaml",
  "arguments": {
    "prompt": "configure this agent network with a new agent called 'api-manager'",
    "mode": "configure"
  }
}
Example request (edit mode)
{
  "name": "configure_agent_network_yaml",
  "arguments": {
    "prompt": "remove the connection between agent1 and agent2",
    "mode": "edit"
  }
}
Example response
{
  "instructions": [
    "1. Open the agent-network.yaml file in your project",
    "2. Locate the 'agents' section",
    "3. Add the following agent configuration:",
    "   - name: api-manager",
    "     type: llm",
    "     provider: openai",
    "     model: gpt-4",
    "4. Save the file",
    "5. Validate the YAML syntax"
  ],
  "mode": "configure",
  "yamlSnippet": {
    "agents": [
      {
        "name": "api-manager",
        "type": "llm",
        "provider": "openai",
        "model": "gpt-4"
      }
    ]
  }
}

create_agent_network_project

Create and scaffold an agent network project with a name and location you specify.

Available only in Anypoint Code Builder.

Parameter Description Required?

projectName

Unique name of the project, also used as the name of the agent network project file.

Yes

projectPath

Parent location of the project. The default is the parent folder of the current workspace. The project resides in a subfolder of projectPath.

Yes

projectDescription

Description of the project.

No

groupId

Organization or business group ID of the project.

No

Example request
{
  "name": "create_agent_network_project",
  "arguments": {
    "projectName": "my-agent-network",
    "projectPath": "/Users/developer/projects",
    "projectDescription": "A sample agent network for API management"
  }
}
Example response
{
  "success": true,
  "projectPath": "/Users/developer/projects/my-agent-network",
  "filesCreated": [
    "agent-network.yaml",
    "exchange.json",
    "README.md"
  ],
  "message": "Agent network project created successfully"
}

create_and_manage_api_instances

Create and configure API instances in Anypoint API Manager.

Parameter Description Required?

organizationId

The ID of the organization where the instance resides. The default is the ID of the user’s organization from the current session.

No

environmentName

The name of the environment where the instance resides. The default is the environment for the organization specified in organizationId.

No

apiInstanceId

Instance ID of the API.

No

Required if you’re configuring an API instance.

apiInstanceLabel

Label or name of the API instance.

No

operation

Operation to perform on the API instance. Valid values are:

  • create to create an API instance.

  • configureBasicEndpointInMuleApplication to configure a basic endpoint in a Mule application.

Yes

groupId

Group ID of the API asset in Anypoint Exchange.

No

assetId

ID of the API asset in Anypoint Exchange. Value can be the API name.

No

Required to create an API instance.

assetVersion

Version of the API asset in Anypoint Exchange.

No

runtimeEngine

Engine the API instance runs on. Valid value is mule4.

No

muleProxyType

Valid value is basicEndpoint.

No

endpointUri

Endpoint URI of the API instance (upstream).

No

Required if muleProxyType=basicEndpoint.

consumerEndpoint

Consumer endpoint of the API instance.

No

providerId

Provider ID of the API instance.

No

Example request (create API instance)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "create_and_manage_api_instances",
  "arguments": {
    "operation": "create",
    "assetId": "customer-api",
    "assetVersion": "1.0.0",
    "apiInstanceLabel": "Customer Management API",
    "runtimeEngine": "mule4",
    "muleProxyType": "basicEndpoint",
    "endpointUri": "https://backend.example.com/api/customers",
    "consumerEndpoint": "https://api.example.com/customers"
  }
}
Example response
{
  "success": true,
  "apiInstanceId": "12345",
  "apiInstanceLabel": "Customer Management API",
  "assetId": "customer-api",
  "assetVersion": "1.0.0",
  "endpointUri": "https://backend.example.com/api/customers",
  "consumerEndpoint": "https://api.example.com/customers",
  "status": "active",
  "message": "API instance created successfully"
}

create_and_manage_assets

Create, update, and delete assets in Anypoint Exchange.

Parameter Description Required?

operation

Operation to perform on the asset. Valid values are:

  • create to create an asset.

  • update to modify an existing asset.

  • delete to remove an asset.

Yes

groupId

Group ID of the asset in Anypoint Exchange.

No

assetId

The ID of the asset.

No

version

Version of the asset, for example, 1.4.0.

No

Required for asset creation.

organizationId

The ID of the org to publish the asset to.

No

Optional for asset creation.

classifier

The type of asset. Valid values are:

  • raml-fragment

  • raml

  • oas

  • wsdl

  • http-api

  • custom

  • evented-api

  • graphql

  • mule-application

  • mule-plugin

No

Required for asset creation.

name

The name of the asset.

No

  • Required for asset creation.

  • Optional for asset update.

description

The description of the asset to create or update.

No

assetLink

The URL of the asset.

No

Required when creating wsdl or http assets.

apiVersion

The product version of API assets.

No

Required when creating raml, oas, wsdl, or http assets.

main

The main file of the asset.

No

Required when creating raml, raml-fragment, oas, and wsdl assets.

dependencies

A stringified array of dependency JSON objects, where each object consists of groupId, assetId, and version.

No

Required when creating api-group assets.

originalFormatVersion

The version of the API spec format.

No

Required for asset creation.

metadata

Stringified value of a Design Center JSON object describing the asset projectId, branchId, and commitId. Used for asset creation.

No

keywords

Stringified array of string values to save as the asset’s attributes. Use to find assets by keyword. Used for asset creation.

No

tags

Stringified array of string values to save as the asset’s tags. Used for asset creation.

No

projectPath

The asset project file or project root directory.

No

Required for raml, raml-fragment, oas, evented-api, wsdl, mule-plugin, and mule-application asset creation.

deleteType

Type of asset deletion to perform. Valid values are:

  • soft-delete indicates logical deletion.

  • hard-delete indicates physical deletion.

The default value is soft-delete.

No

contactName

New contact name for the asset. Used for updating the asset.

No

contactEmail

New contact email of the asset. Used for updating the asset.

No

iconFile

Path to the icon file (image formats such as PNG and JPG) to add to the asset. Used for updating the asset.

No

assetPropertiesFilePath

Path to the asset properties file. File name should be pom.xml or have a .pom extension.

No

Optional for asset creation.

Example request (create asset)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "create_and_manage_assets",
  "arguments": {
    "operation": "create",
    "groupId": "com.mycompany.apis",
    "assetId": "customer-management-api",
    "version": "1.0.0",
    "classifier": "raml",
    "name": "Customer Management API",
    "description": "RESTful API for managing customer data and operations",
    "apiVersion": "v1",
    "main": "customer-api.raml",
    "originalFormatVersion": "1.0",
    "projectPath": "/Users/developer/customer-api-project",
    "keywords": "[\"customer\", \"management\", \"rest\", \"api\"]",
    "tags": "[\"v1\", \"production-ready\"]"
  }
}
Example request (update asset)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "create_and_manage_assets",
  "arguments": {
    "operation": "update",
    "groupId": "com.mycompany.apis",
    "assetId": "customer-management-api",
    "description": "Updated RESTful API for managing customer data with enhanced features",
    "contactName": "API Team",
    "contactEmail": "api-team@mycompany.com"
  }
}
Example response (create)
{
  "success": true,
  "operation": "create",
  "groupId": "com.mycompany.apis",
  "assetId": "customer-management-api",
  "version": "1.0.0",
  "classifier": "raml",
  "name": "Customer Management API",
  "exchangeUrl": "https://anypoint.mulesoft.com/exchange/com.mycompany.apis/customer-management-api/1.0.0/",
  "status": "published",
  "message": "Asset created successfully in Anypoint Exchange"
}
Example response (update)
{
  "success": true,
  "operation": "update",
  "groupId": "com.mycompany.apis",
  "assetId": "customer-management-api",
  "updatedFields": ["description", "contactName", "contactEmail"],
  "message": "Asset updated successfully in Anypoint Exchange"
}

create_and_manage_metadata

Define metadata for a flow component, attach metadata to Mule flow components, and update existing metadata. To define metadata, provide the Mule configuration file URI and sample data or schema. To apply metadata, specify existing metadata types. To update metadata, provide new schema or sample data.

Available only in Anypoint Code Builder.

Parameter Description Required?

projectPath

Path of the Mule project directory where the pom.xml file is located.

Yes

operation

Task to perform. Valid values are:

  • define to create metadata.

  • attach to apply metadata to flow components.

  • update to update existing metadata.

Yes

metadata

String value of sample data or schema JSON object. JSON original format is required (no conversion from other formats). If this metadata is for input or output, use the applyMetadataOn parameter.

No

Required when the operation parameter value is define.

dataFormat

The format of the metadata to process. Specify JSON for JSON-formatted metadata or XML for XML-formatted metadata.

No

metadataPath

Path of the sample metadata or schema file. To specify if this metadata is for input or output, use the applyMetadataOn parameter.

No

Required when the operation parameter value is define.

componentNodeDocId

The doc:id attribute value of the flow component. For example, if the node is <ee:transform doc:name='Transform' doc:id='hdipfo' >, specify hdipfo as the componentNodeDocId.

No

  • Required when the operation is apply.

  • Optional when the operation is define.

metadataName

Name of the new metadata to define based on a sample data JSON, for example, customer if sample data is for a customer.

No

Required when the operation parameter value is define.

isSchema

Whether the metadata is a schema.

Yes

Required when the operation parameter value is define.

applyMetadataOn

Specifies whether the metadata is for the component’s input or output. If not specified, metadata is used for input.

No

  • Required when the operation is apply.

  • Optional when the operation is define.

existingMetadata

Name of existing metadata type to apply to the flow component node. To specify if this metadata is for input or output, use the applyMetadataOn parameter.

No

Required when the operation parameter value is apply.

listExistingMetadata

Whether to list all available metadata types in the project. Use this parameter to discover existing metadata.

No

updateMetadata

Name of existing metadata type to update.

No

Required when the operation parameter value is update.

toolSummary

Description of the tool.

No

Example request (define metadata)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "create_and_manage_metadata",
  "arguments": {
    "projectPath": "/Users/developer/customer-api-project",
    "operation": "define",
    "metadataName": "CustomerData",
    "metadata": "{\"customerId\": \"CUST-001\", \"firstName\": \"John\", \"lastName\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone\": \"+1-555-123-4567\"}",
    "dataFormat": "JSON",
    "isSchema": false
  }
}
Example request (apply metadata)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "create_and_manage_metadata",
  "arguments": {
    "projectPath": "/Users/developer/customer-api-project",
    "operation": "apply",
    "componentNodeDocId": "transform-customer-data",
    "existingMetadata": "CustomerData",
    "applyMetadataOn": "input",
    "isSchema": false
  }
}
Example response (define)
{
  "success": true,
  "operation": "define",
  "metadataName": "CustomerData",
  "dataFormat": "JSON",
  "metadataPath": "/Users/developer/customer-api-project/src/main/resources/metadata/CustomerData.json",
  "message": "Metadata 'CustomerData' defined successfully"
}

list_applications

Get information about all applications in the environment you specify, sorted by last update date and time, in descending order. You can also specify an optional deployment name.

Parameter Description Required?

environmentName

Name of the environment to list applications from.

Yes

appName

An application to search for.

No

organizationId

ID of the organization to list applications from.

No

page

The page number of the result.

No

includeCpuMetrics

Set value to true to include CPU metrics when searching for an application.

No

includeHeapMetrics

Set value to true to include used and total heap metrics when searching for an application.

No

includeLogs

Set value to true to include logs from searching for an application. Maximum 500 entries.

No

timeFrame

If includeCpuMetrics, includeHeapMetrics, or includeLogs is true, this parameter contains the time frame for metrics.

Valid values are 5m, 15m, 30m, 1h, 3h, 6h, 12h, 24h, 3d, 5d, 7d, 15d, and 30d.

The default value is 30m.

No

logLevel

If includeLogs is true, this parameter contains the level of log detail. Valid values are INFO, DEBUG, WARN, and ERROR. The default value is ERROR.

No

logsPage

Page number of log. Maximum is 20. Default is 1.

No

Example request (basic application list)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "list_applications",
  "arguments": {
    "environmentName": "Production",
    "page": 1
  }
}
Example request (with metrics and logs)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "list_applications",
  "arguments": {
    "environmentName": "Production",
    "appName": "customer-integration-app",
    "includeCpuMetrics": true,
    "includeHeapMetrics": true,
    "includeLogs": true,
    "timeFrame": "1h",
    "logLevel": "ERROR"
  }
}
Example response
{
  "success": true,
  "environmentName": "Production",
  "page": 1,
  "totalApplications": 15,
  "applications": [
    {
      "applicationId": "app-12345",
      "applicationName": "customer-integration-app",
      "status": "RUNNING",
      "runtimeVersion": "4.9.4:2e-java17",
      "lastUpdated": "2024-01-15T14:30:00Z",
      "replicas": 2,
      "vcoresUsed": 1.0,
      "memoryUsed": "1GB",
      "cpuMetrics": {
        "averageCpuUsage": 45.2,
        "maxCpuUsage": 78.5,
        "timeFrame": "1h"
      },
      "heapMetrics": {
        "usedHeapMB": 512,
        "totalHeapMB": 1024,
        "timeFrame": "1h"
      },
      "logs": [
        {
          "timestamp": "2024-01-15T14:25:00Z",
          "level": "ERROR",
          "message": "Connection timeout to external service",
          "thread": "processor-thread-1"
        }
      ]
    },
    {
      "applicationId": "app-67890",
      "applicationName": "order-processing-app",
      "status": "RUNNING",
      "runtimeVersion": "4.9.4:2e-java17",
      "lastUpdated": "2024-01-14T09:15:00Z",
      "replicas": 1,
      "vcoresUsed": 0.5,
      "memoryUsed": "512MB"
    }
  ]
}

list_governance_rulesets

List governance rulesets that apply to a project along with the rules that form each ruleset. Includes rulesets added as project dependencies and centralized governance rulesets.

Available only in Anypoint Code Builder.

Parameter Description Required?

projectPath

Path to the project folder. The default is the current workspace. For absolute paths, use file: followed by three slash characters.

No

Example request
{
  "name": "list_governance_rulesets",
  "arguments": {
    "projectPath": "/Users/developer/projects/pet-store-api"
  }
}
Example response
{
  "rulesets": [
    {
      "name": "API Governance Ruleset",
      "assetId": "api-governance-ruleset",
      "groupId": "com.mulesoft.governance",
      "version": "1.4.0",
      "type": "dependency",
      "rules": [
        {
          "name": "api-title-required",
          "description": "API title is required",
          "absolutePath": "/Users/developer/.mule/rulesets/api-governance-ruleset/rules/api-title-required.js",
          "severity": "error"
        },
        {
          "name": "api-version-required",
          "description": "API version is required",
          "absolutePath": "/Users/developer/.mule/rulesets/api-governance-ruleset/rules/api-version-required.js",
          "severity": "error"
        }
      ]
    },
    {
      "name": "Centralized Security Ruleset",
      "type": "centralized",
      "rules": [
        {
          "name": "https-required",
          "description": "HTTPS is required for all endpoints",
          "absolutePath": "/Users/developer/.mule/rulesets/centralized/security/https-required.js",
          "severity": "warning"
        }
      ]
    }
  ]
}

manage_api_instance_policy

Apply a new policy to an API instance and update an existing policy configuration.

Parameter Description Required?

organizationId

The ID of the organization where instances reside. Default is the ID of the user’s organization from the current session.

No

environmentName

The name of the environment where instances reside. Default is the environment for the organization specified in organizationId.

No

apiInstanceId

ID of the API instance.

Yes

operation

Operation to perform on the API instance policy. Use apply to apply a new policy or update to update an existing policy configuration.

Yes

policyId

ID of the policy to configure.

No

Required to update an existing policy configuration.

policyConfiguration

Configuration object for the policy.

No

Required to apply a new policy.

groupId

Group ID of the policy asset in Anypoint Exchange.

No

Required to apply a new policy.

assetId

Asset ID of the policy asset in Anypoint Exchange.

No

Required to apply a new policy.

assetVersion

Version of the policy asset in Anypoint Exchange.

No

Required to apply a new policy.

Example request (apply new policy)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "manage_api_instance_policy",
  "arguments": {
    "apiInstanceId": "12345",
    "operation": "apply",
    "groupId": "68ef9520-24e9-4cf2-b2f5-620025690913",
    "assetId": "rate-limiting-sla-based",
    "assetVersion": "1.2.0",
    "policyConfiguration": "{\"rateLimits\": [{\"maximumRequests\": 100, \"timePeriodInMilliseconds\": 60000}], \"clusterizable\": true}"
  }
}
Example request (update existing policy)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "manage_api_instance_policy",
  "arguments": {
    "apiInstanceId": "12345",
    "operation": "update",
    "policyId": "policy-67890",
    "policyConfiguration": "{\"rateLimits\": [{\"maximumRequests\": 200, \"timePeriodInMilliseconds\": 60000}], \"clusterizable\": true}"
  }
}
Example response
{
  "success": true,
  "operation": "apply",
  "apiInstanceId": "12345",
  "policyId": "policy-new-123",
  "policyName": "Rate Limiting - SLA Based",
  "assetId": "rate-limiting-sla-based",
  "version": "1.2.0",
  "status": "applied",
  "configuration": {
    "rateLimits": [
      {
        "maximumRequests": 100,
        "timePeriodInMilliseconds": 60000
      }
    ],
    "clusterizable": true
  },
  "message": "Policy applied successfully to API instance"
}

manage_flex_gateway_policy_project

Provide instructions to the LLM on how to manage a Flex Gateway custom policy project. Instructions include how to create the project, set up the configuration, build the project, publish a development version of the project, and publish a release version of the project.

Prerequisites: See Prerequisites.

Parameter Description Required?

operation

Operation to perform on the Flex Gateway policy project. Use create to create a project, configure to set up project configuration, build to compile the project, publish-dev to publish to development environment, or publish-release to publish a release version.

Yes

projectPath

Path to the Flex Gateway policy project directory.

No

policyName

Name of the policy project.

No

Example request
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "manage_flex_gateway_policy_project",
  "arguments": {
    "operation": "create",
    "projectPath": "/Users/developer/flex-policies",
    "policyName": "custom-auth-policy"
  }
}
Example response
{
  "success": true,
  "operation": "create",
  "instructions": [
    "1. Install Rust and Cargo (if not already installed):",
    "   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh",
    "",
    "2. Install the PDK CLI:",
    "   cargo install pdk-cli",
    "",
    "3. Create a new policy project:",
    "   pdk new custom-auth-policy --path /Users/developer/flex-policies",
    "",
    "4. Navigate to the project directory:",
    "   cd /Users/developer/flex-policies/custom-auth-policy",
    "",
    "5. Edit src/lib.rs to implement your policy logic",
    "",
    "6. Update Cargo.toml with policy metadata",
    "",
    "7. Test the policy:",
    "   cargo test",
    "",
    "8. Build the policy:",
    "   pdk build"
  ],
  "projectStructure": {
    "src/lib.rs": "Main policy implementation",
    "Cargo.toml": "Project configuration and dependencies",
    "definition/gcl.yaml": "Policy definition for API Manager",
    "tests/": "Policy test files"
  },
  "nextSteps": "After creating the project, implement your custom authentication logic in src/lib.rs and define the policy schema in definition/gcl.yaml"
}

mock_api_spec

Test an endpoint’s functionality by making a request through a mocking service. Specify the endpoint, method, and payload sent to the endpoint as body content. If you don’t specify body content, then the tool looks for examples in the endpoint information in the API spec.

Available only in Anypoint Code Builder.

Parameter Description Required?

endpointUrl

URL of the endpoint.

Yes

method

HTTP method to create the request to the mocking service.

Yes

id

Random, agent-generated UUID number that identifies the request to the mocking service.

Yes

headers

Delimited string of headers sent to the endpoint. The delimiter character is \n. For example, Authorization: token\nOrigin: localhost.

No

payload

Body content sent to the endpoint as a string. Make sure to consider the endpoint’s expected media type.

No

projectPath

Path to the project folder. The default is the current workspace. For absolute paths, use file: followed by three slash characters.

No

Example request (GET)
{
  "name": "mock_api_spec",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "method": "GET",
    "endpointUrl": "https://api.example.com/pets",
    "projectPath": "/Users/developer/projects/pet-store-api",
    "headers": "Authorization: Bearer token123\nAccept: application/json"
  }
}
Example request (POST)
{
  "name": "mock_api_spec",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440001",
    "method": "POST",
    "endpointUrl": "https://api.example.com/pets",
    "projectPath": "/Users/developer/projects/pet-store-api",
    "headers": "Authorization: Bearer token123\nContent-Type: application/json",
    "payload": "{\"name\": \"Fluffy\", \"category\": \"cat\", \"status\": \"available\"}"
  }
}
Example response
{
  "success": true,
  "requestId": "550e8400-e29b-41d4-a716-446655440000",
  "statusCode": 200,
  "responseHeaders": {
    "Content-Type": "application/json",
    "X-Request-ID": "550e8400-e29b-41d4-a716-446655440000"
  },
  "responseBody": "{\"pets\": [{\"id\": \"1\", \"name\": \"Fluffy\", \"category\": \"cat\", \"status\": \"available\"}, {\"id\": \"2\", \"name\": \"Buddy\", \"category\": \"dog\", \"status\": \"available\"}]}",
  "responseTime": 45,
  "message": "Mock request completed successfully"
}

modify_munit_test

Modify or fix an existing MUnit test case, including updating assertions, mocks, payloads, and test logic.

Parameter Description Required?

projectSource

The Mule flow definition, in XML format, for which an MUnit test needs to be generated. Do not include the namespace declaration. Only send the complete flow definition.

Yes

prompt

A prompt that explains the validation of the test case, for example, "Verify the flow returns a 400 error when an invalid payload is received."

Yes

dependencies

A JSON object containing flow dependencies referenced by the main flow. The object must include flowDependencies: An array of flow dependency objects that contain the source (the source of the dependency) and`name` (the name of the dependency) properties.

Yes

existingMunit

The XML source of the existing MUnit test case that needs to be modified, including the <munit:test> element and all nested components, such as mocks, variables, and assertions.

Yes

Example request
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "manage_flex_gateway_policy_project",
  "arguments": {
    "projectSource": "<flow name=\"customer-api-flow\" doc:id=\"abc123\">\n  <http:listener doc:name=\"Listener\" doc:id=\"def456\" config-ref=\"HTTP_Listener_config\" path=\"/customers/{customerId}\" allowedMethods=\"GET\"/>\n  <logger level=\"INFO\" doc:name=\"Log Request\" doc:id=\"ghi789\" message=\"Processing request for customer: #[attributes.uriParams.customerId]\"/>\n  <flow-ref doc:name=\"validate-customer-id\" doc:id=\"jkl012\" name=\"validate-customer-id\"/>\n  <db:select doc:name=\"Get Customer\" doc:id=\"mno345\" config-ref=\"Database_Config\">\n    <db:sql><![CDATA[SELECT * FROM customers WHERE id = :customerId AND status = 'ACTIVE']]></db:sql>\n    <db:input-parameters><![CDATA[#[{customerId: attributes.uriParams.customerId}]]]></db:input-parameters>\n  </db:select>\n  <choice doc:name=\"Choice\" doc:id=\"pqr678\">\n    <when expression=\"#[sizeOf(payload) > 0]\">\n      <ee:transform doc:name=\"Transform Customer\" doc:id=\"stu901\">\n        <ee:message>\n          <ee:set-payload><![CDATA[%dw 2.0\noutput application/json\n---\n{\n  customerId: payload[0].id,\n  customerName: payload[0].name,\n  emailAddress: payload[0].email,\n  accountStatus: \"active\",\n  lastUpdated: now()\n}]]></ee:set-payload>\n        </ee:message>\n      </ee:transform>\n    </when>\n    <otherwise>\n      <set-payload value='#[{\"error\": \"Customer not found or inactive\", \"code\": \"CUSTOMER_NOT_FOUND\"}]' doc:name=\"Customer Not Found\" doc:id=\"vwx234\"/>\n      <set-variable value=\"404\" doc:name=\"Set Status\" doc:id=\"yz567\" variableName=\"httpStatus\"/>\n    </otherwise>\n  </choice>\n</flow>",
    "prompt": "The existing test is failing because the flow was updated to include a status filter in the database query and the response structure changed. Update the test to use the new field names (customerId instead of id, customerName instead of name, emailAddress instead of email) and add the lastUpdated field validation. Also update the mock to include the status field in the database response.",
    "dependencies": {
      "flowDependencies": [
        {
          "source": "<sub-flow name=\"validate-customer-id\" doc:id=\"validate123\">\n  <validation:is-not-empty doc:name=\"Validate ID Not Empty\" doc:id=\"val456\" value=\"#[attributes.uriParams.customerId]\" message=\"Customer ID is required\"/>\n  <validation:matches-regex doc:name=\"Validate ID Format\" doc:id=\"val789\" value=\"#[attributes.uriParams.customerId]\" regex=\"^[0-9]+$\" message=\"Customer ID must be numeric\"/>\n</sub-flow>",
          "name": "validate-customer-id"
        }
      ]
    },
      "existingMunit": "<munit:test name=\"customer-api-flow-successful-retrieval\" description=\"Verify the flow returns customer data when a valid customer ID is provided\">\n    <munit:behavior>\n      <set-variable variableName=\"testCustomerId\" value=\"12345\"/>\n      <munit-tools:mock-when doc:name=\"Mock Database Response\" processor=\"db:select\">\n        <munit-tools:with-attributes>\n          <munit-tools:with-attribute whereValue=\"mno345\" attributeName=\"doc:id\"/>\n        </munit-tools:with-attributes>\n        <munit-tools:then-return>\n          <munit-tools:payload value='#[[{\"id\": 12345, \"name\": \"John Doe\", \"email\": \"john.doe@example.com\"}]]'/>\n        </munit-tools:then-return>\n      </munit-tools:mock-when>\n    </munit:behavior>\n    <munit:execution>\n      <flow-ref name=\"customer-api-flow\"/>\n    </munit:execution>\n    <munit:validation>\n      <munit-tools:assert-that doc:name=\"Assert Payload is Not Empty\" expression=\"#[payload]\" is=\"#[MunitTools::notNullValue()]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Customer ID\" actual=\"#[payload.id]\" expected=\"#[12345]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Customer Name\" actual=\"#[payload.name]\" expected=\"#[\\\"John Doe\\\"]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Customer Email\" actual=\"#[payload.email]\" expected=\"#[\\\"john.doe@example.com\\\"]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Customer Status\" actual=\"#[payload.status]\" expected=\"#[\\\"active\\\"]\"/>\n    </munit:validation>\n  </munit:test>"
  }
}
Example response
{
  "success": true,
  "message": "MUnit test case modified successfully",
  "details": {
    "testCaseName": "customer-api-flow-successful-retrieval",
    "modificationType": "field_mapping_update",
    "changesApplied": [
      "Updated database mock to include status field",
      "Changed assertion field names to match new response structure",
      "Added validation for lastUpdated field",
      "Updated mock data to reflect active status requirement"
      ],
    "modifiedTestCase": "<munit:test name=\"customer-api-flow-successful-retrieval\" description=\"Verify the flow returns customer data when a valid customer ID is provided\">\n    <munit:behavior>\n      <set-variable variableName=\"testCustomerId\" value=\"12345\"/>\n      <munit-tools:mock-when doc:name=\"Mock Database Response\" processor=\"db:select\">\n        <munit-tools:with-attributes>\n          <munit-tools:with-attribute whereValue=\"mno345\" attributeName=\"doc:id\"/>\n        </munit-tools:with-attributes>\n        <munit-tools:then-return>\n          <munit-tools:payload value='#[[{\"id\": 12345, \"name\": \"John Doe\", \"email\": \"john.doe@example.com\", \"status\": \"ACTIVE\"}]]'/>\n        </munit-tools:then-return>\n      </munit-tools:mock-when>\n    </munit:behavior>\n    <munit:execution>\n      <flow-ref name=\"customer-api-flow\"/>\n    </munit:execution>\n    <munit:validation>\n      <munit-tools:assert-that doc:name=\"Assert Payload is Not Empty\" expression=\"#[payload]\" is=\"#[MunitTools::notNullValue()]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Customer ID\" actual=\"#[payload.customerId]\" expected=\"#[12345]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Customer Name\" actual=\"#[payload.customerName]\" expected=\"#[\\\"John Doe\\\"]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Customer Email\" actual=\"#[payload.emailAddress]\" expected=\"#[\\\"john.doe@example.com\\\"]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Account Status\" actual=\"#[payload.accountStatus]\" expected=\"#[\\\"active\\\"]\"/>\n      <munit-tools:assert-that doc:name=\"Assert Last Updated Exists\" expression=\"#[payload.lastUpdated]\" is=\"#[MunitTools::notNullValue()]\"/>\n      <munit-tools:assert-that doc:name=\"Assert Last Updated is DateTime\" expression=\"#[payload.lastUpdated]\" is=\"#[MunitTools::instanceOf(DateTime)]\"/>\n    </munit:validation>\n  </munit:test>",
    "beforeAfterComparison": {
      "mockChanges": {
        "before": "Mock returned: {\"id\": 12345, \"name\": \"John Doe\", \"email\": \"john.doe@example.com\"}",
        "after": "Mock returns: {\"id\": 12345, \"name\": \"John Doe\", \"email\": \"john.doe@example.com\", \"status\": \"ACTIVE\"}"
      },
      "assertionChanges": [
        {
          "before": "payload.id",
          "after": "payload.customerId",
          "reason": "Field renamed in flow transformation"
        },
        {
          "before": "payload.name",
          "after": "payload.customerName",
          "reason": "Field renamed in flow transformation"
        },
        {
          "before": "payload.email",
          "after": "payload.emailAddress",
          "reason": "Field renamed in flow transformation"
        },
        {
          "added": "payload.lastUpdated validation",
          "reason": "New field added to flow output"
        }
      ]
    },
    "testExecutionReady": true,
    "nextSteps": [
      "Replace the existing test case in the MUnit file with this modified version",
      "Run the test to verify it passes with the updated flow",
      "Consider adding additional test cases for inactive customer scenarios",
      "Verify all related test cases are updated for consistency"
    ]
  }
}

open_project

Open a project. For example, an API spec or an agent network project.

Available only in Anypoint Code Builder.

Parameter Description Required?

projectPath

Path to the project folder. The default is the current workspace. For absolute paths, use file: followed by three slash characters. For example, file:///Users/myUser/workspace/.

No

newWindow

Whether the project opens in a new VS Code window (true) or not (false). The default is false.

No

addToWorkspace

Whether the project opens in a new folder in the workspace (true) or not (false). If true, then newWindow=false.

No

Example request (open in current window)
{
  "name": "open_project",
  "arguments": {
    "projectPath": "file:///Users/developer/projects/pet-store-api",
    "newWindow": false,
    "addToWorkspace": false
  }
}
Example request (add to workspace)
{
  "name": "open_project",
  "arguments": {
    "projectPath": "file:///Users/developer/projects/customer-api",
    "newWindow": false,
    "addToWorkspace": true
  }
}
Example response
{
  "success": true,
  "projectPath": "file:///Users/developer/projects/pet-store-api",
  "openedInNewWindow": false,
  "addedToWorkspace": false,
  "message": "Project opened successfully in current window"
}

publish_agent_network_assets

Publish agent network assets to Anypoint Exchange for reuse. Specify the location, asset version, and optional organization or business group.

Prerequisite: The agent network project must contain a valid exchange.json file.

Available only in Anypoint Code Builder.

Parameter Description Required?

projectPath

Path to the agent network project to publish.

No

assetVersion

Semantic version for the asset (such as 1.0.0).

Yes

groupId

Organization/business group ID (falls back to project configuration).

No

Example request
{
  "name": "publish_agent_network_assets",
  "arguments": {
    "projectPath": "/Users/developer/projects/my-agent-network",
    "assetVersion": "1.0.0",
    "groupId": "com.example.organization"
  }
}
Example response
{
  "success": true,
  "assetId": "my-agent-network",
  "groupId": "com.example.organization",
  "version": "1.0.0",
  "exchangeUrl": "https://anypoint.mulesoft.com/exchange/com.example.organization/my-agent-network/1.0.0/",
  "message": "Agent network assets published successfully to Exchange"
}

run_local_mule_application

Run application locally in Mule runtime. This tool handles the full local deployment workflow:

  • If needed, it builds the project.

  • If needed, it downloads runtime.

  • It starts the application locally.

Parameter Description Required?

projectPath

Path to the Mule project directory to run locally.

Yes

javaHome

Get JAVA_HOME from JDK from \"AnypointCodeBuilder\" (grep for exact name) installation if it exists. Installation is usually located in the user’s home directory. If the installation doesn’t exist, get the user’s java_home. If multiple JDKs exist, choose the latest one that matches javaSpecificationVersions in mule-artifacts.json. If the JDK version doesn’t match any of the versions in mule-artifacts.json, return 'No JAVA_HOME found. Don’t retry.'.

Yes

Example request
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "run_local_mule_application",
  "arguments": {
    "projectPath": "/Users/developer/customer-integration-app",
    "javaHome": "/Users/developer/.anypoint/AnypointCodeBuilder/jdk-17.0.9+9"
  }
}
Example response
{
  "success": true,
  "projectPath": "/Users/developer/customer-integration-app",
  "javaHome": "/Users/developer/.anypoint/AnypointCodeBuilder/jdk-17.0.9+9",
  "runtimeVersion": "4.9.4-2e",
  "runtimePath": "/Users/developer/.mule/runtimes/mule-enterprise-standalone-4.9.4",
  "deploymentStatus": "starting",
  "applicationUrl": "http://localhost:8081",
  "pid": 12345,
  "logFile": "/Users/developer/.mule/logs/mule_ee.log",
  "message": "Mule application is starting locally. Check logs for deployment status."
}

search_asset

Search for an asset in Anypoint Exchange by name or other specified parameters. Returns the first asset that matches the input criteria.

Parameter Description Required?

searchQuery

The query with criteria for the search. To specify multiple values, use comma-separated values as a single string. Parameter must include at least one value.

No

assetFilters

Show results that match the asset type filters.

No

statuses

Show results that match the status. Valid values are deprecated, development, and published.

No

organizationId

The ID of the organization you want to search. The default value is the ID of the user’s organization from the current session.

No

sharedWithMe

Include shared assets in the results.

No

sortCriteria

Sort search results.

Valid values are name or last_modified_date. Defaults to last_modified_date.

No

ascending

Sort results in ascending order.

No

maxResults

The maximum number of assets to return in the result set. Range is between 1-10. Parameter must include at least one value.

No

Example request
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "search_asset",
  "arguments": {
    "searchQuery": "customer API",
    "assetFilters": ["raml", "oas"],
    "statuses": ["published"],
    "maxResults": 5,
    "sortCriteria": "name",
    "ascending": true
  }
}
Example response
{
  "success": true,
  "searchQuery": "customer API",
  "totalResults": 3,
  "maxResults": 5,
  "assets": [
    {
      "groupId": "com.mycompany.apis",
      "assetId": "customer-management-api",
      "version": "1.0.0",
      "name": "Customer Management API",
      "type": "raml",
      "status": "published",
      "description": "RESTful API for managing customer data and operations",
      "exchangeUrl": "https://anypoint.mulesoft.com/exchange/com.mycompany.apis/customer-management-api/1.0.0/",
      "lastModified": "2024-01-15T10:30:00Z",
      "createdBy": "developer@mycompany.com"
    },
    {
      "groupId": "com.example.apis",
      "assetId": "customer-data-api",
      "version": "2.1.0",
      "name": "Customer Data API",
      "type": "oas",
      "status": "published",
      "description": "OpenAPI specification for customer data services",
      "exchangeUrl": "https://anypoint.mulesoft.com/exchange/com.example.apis/customer-data-api/2.1.0/",
      "lastModified": "2024-01-12T14:20:00Z",
      "createdBy": "api-team@example.com"
    }
  ]
}

test_connection

Test a connector configuration for a Mule project. For example, test connectivity for an HTTP listener connection.

Available only in Anypoint Code Builder.

Parameter Description Required?

configurationUri

Fully qualified URI of the Mule configuration XML file that contains the connector configuration. A valid value starts with file:/// followed by the absolute path.

Yes

configurationName

Value of the name attribute of the connection configuration component in the Mule configuration XML. XPath expressions aren’t supported.

Yes

Example request
{
  "name": "test_connection",
  "arguments": {
    "configurationUri": "file:///Users/developer/customer-integration-app/src/main/mule/global.xml",
    "configurationName": "HTTP_Listener_config"
  }
}
Example response
{
  "success": true,
  "configurationName": "HTTP_Listener_config",
  "connectionTest": "PASSED",
  "testDuration": 1250,
  "message": "Connection test successful",
  "details": {
    "host": "0.0.0.0",
    "port": 8081,
    "protocol": "HTTP",
    "status": "Available"
  }
}

uc_create_connector_workflow

Create a complete LinkWeave connector end-to-end with guided workflow planning. Supports two flows: generating an API spec from documentation, or using an existing API spec file. Returns a detailed workflow plan with numbered steps to execute sequentially.

Available only in Connector Builder.

Parameter Description Required?

workflowCustomization

Any specific workflow customizations, preferences, or requirements for the connector-creation process.

No

flow

Flow selection. Valid values are:

  • generate-spec to generate an API spec from documentation

  • existing-spec if the user has an existing API spec file

  • auto-detect to determine automatically

No

existingApiSpec

Absolute path to existing API spec file (OpenAPI/Swagger YAML or JSON) if using existing-spec flow.

No

Example request (generate spec flow)
{
  "name": "uc_create_connector_workflow",
  "arguments": {
    "flow": "generate-spec",
    "workflowCustomization": "I want to create a connector for Salesforce CRM with focus on lead and opportunity management. Include authentication setup and error handling best practices."
  }
}
Example request (existing spec flow)
{
  "name": "uc_create_connector_workflow",
  "arguments": {
    "flow": "existing-spec",
    "existingApiSpec": "/Users/developer/apis/salesforce-leads-api.yaml",
    "workflowCustomization": "Use this Salesforce API spec to generate a connector with enhanced lead management capabilities."
  }
}
Example response
{
  "success": true,
  "flow": "generate-spec",
  "workflowPlan": [
    {
      "step": 1,
      "title": "Gather API Documentation",
      "description": "Collect official API documentation URLs and identify key use cases",
      "tool": "uc_generate_api_spec",
      "estimatedTime": "5-10 minutes"
    },
    {
      "step": 2,
      "title": "Generate API Specification",
      "description": "Create OpenAPI 3.0 specification from documentation and use cases",
      "tool": "uc_generate_api_spec",
      "estimatedTime": "10-15 minutes"
    },
    {
      "step": 3,
      "title": "Generate Connector Project",
      "description": "Create LinkWeave connector project with CCM and Anypoint phases",
      "tool": "uc_generate_connector",
      "estimatedTime": "15-20 minutes"
    },
    {
      "step": 4,
      "title": "Test and Validate",
      "description": "Test connector functionality and validate against use cases",
      "tool": "test_connection",
      "estimatedTime": "10-15 minutes"
    }
  ],
  "totalEstimatedTime": "40-60 minutes",
  "nextSteps": "Begin with step 1 by providing the platform name, use cases, and documentation URLs to the uc_generate_api_spec tool.",
  "customizations": [
    "Focus on lead and opportunity management endpoints",
    "Include OAuth 2.0 authentication configuration",
    "Implement comprehensive error handling",
    "Add retry logic for rate limiting"
  ]
}

create_api_spec_project

Create and scaffold an API spec or fragment project. You can specify the project name, location, and spec language (RAML or OAS).

Parameter Description Required?

projectName

Name of the API spec project.

Yes

projectLocation

Directory path in which to create the project.

Yes

specLanguage

Specification language for the API project. Valid values are:

  • RAML for RESTful API Modeling Language

  • OAS for OpenAPI specification

Yes

Example request (OAS 3.0)
{
  "name": "create_api_spec_project",
  "arguments": {
    "projectName": "Pet Store API",
    "projectPath": "/Users/developer/projects",
    "language": "oas",
    "languageVersion": "3.0",
    "format": "yaml",
    "isApiEnabledForTopicsAndActions": true
  }
}
Example request (RAML 1.0)
{
  "name": "create_api_spec_project",
  "arguments": {
    "projectName": "User Management API",
    "projectPath": "/Users/developer/projects",
    "language": "raml",
    "languageVersion": "1.0",
    "format": "yaml"
  }
}
Example request (RAML Fragment)
{
  "name": "create_api_spec_project",
  "arguments": {
    "projectName": "Common Traits",
    "projectPath": "/Users/developer/projects",
    "language": "raml-fragment",
    "languageVersion": "1.0",
    "fragmentType": "trait",
    "format": "yaml"
  }
}
Example response
{
  "success": true,
  "projectPath": "/Users/developer/projects/pet-store-api",
  "filesCreated": [
    "pet-store-api.yaml",
    "exchange.json",
    "README.md"
  ],
  "specType": "oas",
  "specVersion": "3.0",
  "message": "API spec project created successfully"
}

create_mule_project

Create a new Mule project without flow generation. This tool focuses only on the project structure setup with optional parameters.

Parameter Description Required?

projectPath

Directory to create the project in. Default is the current workspace.

No

projectName

Name for the project. Default is a generated name.

No

Example request
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "create_mule_project",
  "arguments": {
    "projectPath": "/Users/developer/projects",
    "projectName": "customer-integration-app"
  }
}
Example response
{
  "success": true,
  "projectPath": "/Users/developer/projects/customer-integration-app",
  "projectName": "customer-integration-app",
  "filesCreated": [
    "pom.xml",
    "src/main/mule/app.xml",
    "src/main/resources/application.properties",
    "src/test/munit/test-suite.xml"
  ],
  "message": "Mule project created successfully"
}

create_MCP_server

Create a MuleSoft MCP server. This tool handles requests for creating MCP servers using Anypoint Connector for MCP (MCP Connector).

Prerequisite: Install MCP Connector.

Parameter Description Required?

projectPath

Path location of the Mule project folder.

Yes

projectXmlPath

Path to the Mule project XML file.

Yes

originalPrompt

The original user input without modifications. Use this for requests to create MCP servers.

Yes

Example request
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "create_mcp_server",
  "arguments": {
    "projectPath": "/Users/developer/mcp-server-project",
    "projectXmlPath": "/Users/developer/mcp-server-project/src/main/mule/app.xml",
    "originalPrompt": "Create an MCP server that provides weather data integration capabilities"
  }
}
Example response
{
  "success": true,
  "projectPath": "/Users/developer/mcp-server-project",
  "mcpServerCreated": true,
  "connectorAdded": true,
  "configurationFiles": [
    "src/main/mule/mcp-server-config.xml",
    "src/main/resources/mcp-server.properties"
  ],
  "message": "MCP server created successfully with MCP Connector integration"
}

dataweave_create_documentation

Generates DataWeave documentation using the proper syntax and returns the content for manual insertion into the project.

Parameter Description Required?

documentation

Detailed description of what the function does.

Yes

parameters

Any parameters applicable to the function.

Yes

example

An example of how to use the function.

Yes

Example request
{
  "tool_name": "dataweave_create_documentation",
   "arguments": {
    "documentation": "Calculates the total price including tax for a list of items. This function takes an array of items with price and quantity, applies the tax rate, and returns the total amount.",
    "parameters": [
      {
        "name": "items",
        "typeExpression": "Array<{price: Number, quantity: Number}>",
        "documentation": "Array of items containing price per unit and quantity for each item"
      },
      {
        "name": "taxRate",
        "typeExpression": "Number",
        "documentation": "Tax rate as a decimal (e.g., 0.08 for 8% tax)"
      }
    ],
    "example": {
      "documentation": "Calculate total with tax for shopping cart items",
      "code": "calculateTotalWithTax([{price: 10.50, quantity: 2}, {price: 25.00, quantity: 1}], 0.08)",
      "output": "46.44"
    }
  }
}
Example response
{
  "success": true,
  "documentation": "/**\n * Calculates the total price including tax for a list of items. This function takes an array of items with price and quantity, applies the tax rate, and returns the total amount.\n *\n * @param items Array of items containing price per unit and quantity for each item\n * @param taxRate Tax rate as a decimal (e.g., 0.08 for 8% tax)\n * @return Number The total amount including tax\n *\n * @example Calculate total with tax for shopping cart items\n * calculateTotalWithTax([{price: 10.50, quantity: 2}, {price: 25.00, quantity: 1}], 0.08)\n * // Returns: 46.44\n */",
  "message": "DataWeave documentation generated successfully"
}

dataweave_create_project

Creates a new DataWeave project, returns the URL of the created project, and prompts to open the project.

Parameter Description Required?

groupId

The group ID of the project.

No

projectName

The project name.

Yes

url

The URL location where you want to create the new project. The default, if not specified, is {USER_HOME}/dw-projects/.

No

Example request
{
  "tool_name": "dataweave_create_project",
  "arguments": {
    "groupId": "com.mycompany.dataweave",
    "projectName": "customer-data-transformer",
    "url": "file:///Users/developer/dataweave-projects/"
  }
}
Example response
{
  "success": true,
  "projectUrl": "file:///Users/developer/dataweave-projects/customer-data-transformer",
  "projectName": "customer-data-transformer",
  "groupId": "com.mycompany.dataweave",
  "filesCreated": [
    "pom.xml",
    "src/main/dw/transform.dwl",
    "src/test/dw/transformTest.dwl",
    "README.md"
  ],
  "message": "DataWeave project created successfully. Would you like to open the project?"
}

dataweave_create_sample_data

Create DataWeave input sample data for a given DataWeave transformation file and return the path where it was created. For example, use this tool to create sample data for a variable if a preview fails with There is no variable named 'variableName'.

Prerequisite: Create the DataWeave script file before running dataweave_create_sample_data. For information about DataWeave scripts, see DataWeave Scripts

Parameter Description Required?

url

The URL of the DataWeave transformation file to create sample input for. The file must be in the format of file:://path. For example, file:///home/mdeachaval/test.dwl. By default, uses the currently open file.

Yes

content

The content of the sample input.

Yes

extension

The file extension for the sample content file type. For example json for a JSON file or xml for an XML file. The default value is json.

Yes

name

The name of the input to generate, such as payload. The default value is payload.

Yes

Example request
{
  "tool_name": "dataweave_create_sample_data",
  "arguments": {
    "url": "file:///Users/developer/my-dataweave-project/src/main/dw/customer-transform.dwl",
    "content": "{\n  \"customerId\": \"CUST-001\",\n  \"firstName\": \"John\",\n  \"lastName\": \"Doe\",\n  \"email\": \"john.doe@example.com\",\n  \"address\": {\n    \"street\": \"123 Main St\",\n    \"city\": \"Anytown\",\n    \"state\": \"CA\",\n    \"zipCode\": \"12345\"\n  },\n  \"orders\": [\n    {\n      \"orderId\": \"ORD-001\",\n      \"amount\": 99.99,\n      \"status\": \"completed\"\n    }\n  ]\n}",
    "extension": "json",
    "name": "payload"
  }
}
Example response
{
  "success": true,
  "sampleDataPath": "file:///Users/developer/my-dataweave-project/src/test/resources/sample_data/json/payload.json",
  "fileName": "payload.json",
  "extension": "json",
  "variableName": "payload",
  "message": "Sample data created successfully for variable 'payload'"
}

dataweave_get_module_metadata

Returns the list of all functions available in a DataWeave module, with documentation for each function, the input parameter types, and the output types. It includes the list of labels for each function to use when searching.

Parameter Description Required?

url

The URL of the project in the format file://<path>.

Yes

moduleUrl

The URL of the DataWeave module file in the format file://<path>.dwl or jar://<path>.dwl to search documentation for. Use the dataweave_get_project_metadata tool to get the URL of a given module.

Yes

Example request
{
  "tool_name": "dataweave_get_module_metadata",
  "arguments": {
    "url": "file:///Users/developer/my-dataweave-project",
    "moduleUrl": "file:///Users/developer/my-dataweave-project/src/main/dw/utils/StringUtils.dwl"
  }
}
Example response
{
  "success": true,
  "moduleUrl": "file:///Users/developer/my-dataweave-project/src/main/dw/utils/StringUtils.dwl",
  "moduleName": "StringUtils",
  "functions": [
    {
      "name": "capitalize",
      "documentation": "Capitalizes the first letter of each word in a string",
      "inputParameters": [
        {
          "name": "text",
          "type": "String",
          "description": "The input string to capitalize"
        }
      ],
      "outputType": "String",
      "labels": ["string", "text", "format", "capitalize"],
      "signature": "capitalize(text: String): String",
      "example": {
        "input": "capitalize(\"hello world\")",
        "output": "\"Hello World\""
      }
    },
    {
      "name": "removeWhitespace",
      "documentation": "Removes all whitespace characters from a string",
      "inputParameters": [
        {
          "name": "input",
          "type": "String",
          "description": "The string to remove whitespace from"
        }
      ],
      "outputType": "String",
      "labels": ["string", "whitespace", "clean", "trim"],
      "signature": "removeWhitespace(input: String): String",
      "example": {
        "input": "removeWhitespace(\"  hello   world  \")",
        "output": "\"helloworld\""
      }
    },
    {
      "name": "splitAndFilter",
      "documentation": "Splits a string by delimiter and filters out empty values",
      "inputParameters": [
        {
          "name": "text",
          "type": "String",
          "description": "The string to split"
        },
        {
          "name": "delimiter",
          "type": "String",
          "description": "The delimiter to split by"
        }
      ],
      "outputType": "Array<String>",
      "labels": ["string", "split", "array", "filter"],
      "signature": "splitAndFilter(text: String, delimiter: String): Array<String>",
      "example": {
        "input": "splitAndFilter(\"a,,b,c,\", \",\")",
        "output": "[\"a\", \"b\", \"c\"]"
      }
    }
  ],
  "variables": [
    {
      "name": "DEFAULT_DELIMITER",
      "type": "String",
      "value": "\",\"",
      "documentation": "Default delimiter used for string operations"
    }
  ],
  "namespaces": [
    {
      "prefix": "str",
      "uri": "dw::core::Strings"
    }
  ],
  "types": [
    {
      "name": "ProcessingOptions",
      "type": "Object",
      "properties": [
        {
          "name": "caseSensitive",
          "type": "Boolean",
          "optional": true
        },
        {
          "name": "trimWhitespace",
          "type": "Boolean",
          "optional": true
        }
      ]
    }
  ]
}

dataweave_get_project_metadata

Returns the metadata of a DataWeave project (including the list of source folders and test folders) that defines where to create the files. The tool output includes the list of available modules with their URL, and all the functions, variables, namespaces, and types. The output also includes the list of all the data formats supported by the project. Call this tool before generating any code.

Parameter Description Required?

url

The URL of the project in the format file://<path>.

Yes

Example request
{
  "tool_name": "dataweave_get_project_metadata",
  "arguments": {
    "url": "file:///Users/developer/my-dataweave-project"
  }
}
Example response
{
  "success": true,
  "projectUrl": "file:///Users/developer/my-dataweave-project",
  "sourceDirectories": [
    "src/main/dw",
    "src/main/resources"
  ],
  "testDirectories": [
    "src/test/dw",
    "src/test/resources"
  ],
  "modules": [
    {
      "name": "dw::core::Arrays",
      "url": "jar://dw-core-modules-2.4.0-20211109.jar!/dw/core/Arrays.dwl",
      "functions": [
        {
          "name": "join",
          "signature": "join(Array<T>, String): String"
        },
        {
          "name": "reduce",
          "signature": "reduce(Array<T>, (item: T, accumulator: R) -> R): R -> R"
        }
      ]
    },
    {
      "name": "StringUtils",
      "url": "file:///Users/developer/my-dataweave-project/src/main/dw/utils/StringUtils.dwl",
      "functions": [
        {
          "name": "capitalize",
          "signature": "capitalize(String): String"
        }
      ]
    }
  ],
  "supportedFormats": [
    "json",
    "xml",
    "csv",
    "yaml",
    "java",
    "multipart"
  ],
  "variables": [
    {
      "name": "PROJECT_VERSION",
      "type": "String",
      "value": "1.0.0"
    }
  ],
  "types": [
    {
      "name": "Customer",
      "definition": "{customerId: String, name: String, email: String}"
    }
  ]
}

dataweave_open_project

Opens a project from a given URL, either in the current window or in a new window.

Parameter Description Required?

url

The URL of the project to open, in the format file://<path>.

Yes

newWindow

Whether to open the file in a new window (true) or not (false). The tool always prompts the user.

No

Example request
{
  "tool_name": "dataweave_open_project",
  "arguments": {
    "url": "file:///Users/developer/my-dataweave-project",
    "newWindow": false
  }
}
Example response
{
  "success": true,
  "projectUrl": "file:///Users/developer/my-dataweave-project",
  "openedInNewWindow": false,
  "message": "DataWeave project opened successfully in current window"
}

dataweave_run_script_tool

Runs a DataWeave transformation using the sample data as input context and displays the output. Use to validate a script output. If the tool fails with missing input, create sample data using dataweave_create_sample_data tool.

Parameter Description Required?

url

The URL of the file to run the preview. The file must be in the format of file:://path. For example, file:///home/mdeachaval/test.dwl. By default, uses the currently open file.

Yes

content

The content of the script to execute.

Yes

Example request
{
  "tool_name": "dataweave_run_script_tool",
  "arguments": {
    "url": "file:///Users/developer/my-dataweave-project/src/main/dw/customer-transform.dwl",
    "content": "%dw 2.0\noutput application/json\n---\n{\n  fullName: payload.firstName ++ \" \" ++ payload.lastName,\n  contact: {\n    email: payload.email,\n    phone: payload.phoneNumber\n  },\n  customerType: if (payload.orders sizeOf > 5) \"premium\" else \"standard\"\n}"
  }
}
Example response
{
  "success": true,
  "scriptUrl": "file:///Users/developer/my-dataweave-project/src/main/dw/customer-transform.dwl",
  "output": "{\n  \"fullName\": \"John Doe\",\n  \"contact\": {\n    \"email\": \"john.doe@example.com\",\n    \"phone\": \"+1-555-123-4567\"\n  },\n  \"customerType\": \"standard\"\n}",
  "executionTime": 45,
  "outputMimeType": "application/json",
  "message": "DataWeave script executed successfully"
}

deploy_agent_network

Deploy an agent network instance to a runtime environment. Specify the project path, target environment, deployment target, and Managed Flex Gateway configuration for deployment.

Prerequisites:

  • Managed Flex Gateway

  • A business group

  • A valid exchange.json file in the agent network project

Available only in Anypoint Code Builder.

Parameter Description Required?

projectPath

Path to the agent network project to deploy.

No

environmentName

Target environment name (prompts for selection if not provided).

No

privateSpaceName

Private space name (prompts for selection if not provided).

No

ingressGatewayName

Ingress gateway name (prompts for selection if not provided).

No

egressGatewayName

Egress gateway name (prompts for selection if not provided).

No

Example request
{
  "name": "deploy_agent_network",
  "arguments": {
    "projectPath": "/Users/developer/projects/my-agent-network"
  }
}
Example response
{
  "success": true,
  "deploymentId": "deployment-12345",
  "projectPath": "/Users/developer/projects/my-agent-network",
  "environment": "production",
  "status": "deployed",
  "deploymentUrl": "https://agent-network.example.com",
  "deploymentTime": "2024-01-15T10:30:00Z",
  "message": "Agent network deployed successfully"
}

deploy_mule_application

Deploy your application to CloudHub 2.0 or Runtime Fabric and run it. You can deploy from a local project or Anypoint Exchange asset. This tool supports security, high availability, and performance optimization deployment options.

Parameter Description Required?

projectPath

Path to Maven project root directory.

No

appName

The name of the application to deploy.

No

environmentName

Name of the environment to deploy the app to.

No

deploymentTargetName

Name of the deployment target.

No

runtimeVersion

Runtime version to use.

No

groupId

Group ID of the asset in Anypoint Exchange.

No

artifactId

Artifact ID of the asset in Anypoint Exchange.

No

version

Version of the asset or application.

No

secure

Whether to enable enhanced security features. The default is false.

No

highAvailability

Whether to enable high availability features. The default is false.

No

performanceOptimization

Whether to enable performance optimization features. The default is false.

No

minimumReplicas

Minimum number of replicas if high availability or performance optimization is enabled. Minimum is 1.

No

organizationId

The ID of the organization to deploy the application to.

No

Example request (local project deployment)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "deploy_mule_application",
  "arguments": {
    "projectPath": "/Users/developer/customer-integration-app",
    "appName": "customer-integration-prod",
    "environmentName": "Production",
    "deploymentTargetName": "CloudHub 2.0",
    "runtimeVersion": "4.9.4:2e-java17",
    "highAvailability": true,
    "performanceOptimization": true,
    "minimumReplicas": 2,
    "secure": true
  }
}
Example request (Exchange asset deployment)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "deploy_mule_application",
  "arguments": {
    "groupId": "com.mycompany.apps",
    "artifactId": "customer-integration-app",
    "version": "1.0.0",
    "appName": "customer-integration-staging",
    "environmentName": "Staging",
    "deploymentTargetName": "CloudHub 2.0",
    "runtimeVersion": "4.9.4:2e-java17"
  }
}
Example response
{
  "success": true,
  "deploymentId": "d7f4c8b2-9e1a-4f5b-8c3d-2a6b9e4f7c1a",
  "appName": "customer-integration-prod",
  "environmentName": "Production",
  "deploymentTargetName": "CloudHub 2.0",
  "runtimeVersion": "4.9.4:2e-java17",
  "status": "deploying",
  "applicationUrl": "https://customer-integration-prod.us-e2.cloudhub.io",
  "replicas": 2,
  "features": {
    "highAvailability": true,
    "performanceOptimization": true,
    "secure": true
  },
  "estimatedDeploymentTime": "5-8 minutes",
  "message": "Application deployment initiated successfully"
}

generate_api_spec

Generate, modify, or enhance an API spec using AI.

Prerequisites:

  1. Log in to Anypoint Code Builder with your Anypoint Platform credentials.

  2. Enable Einstein in Access Management.

Parameter Description Required?

language

Language of the API specification to generate. Valid values are:

  • oas for OpenAPI specifications

  • raml for RAML specifications

Yes

languageVersion

  • If language=oas, valid value is 3.0.

  • If language=raml, valid value is 1.0.

Yes

specSyntax

Syntax of the generated API spec.

  • If language=oas or oas-components, valid values are json and yaml.

  • If language=raml or raml-fragments, valid value is raml.

Yes

projectType

Valid value is API_SPEC.

Yes

naturalLanguagePrompt

Input to the Large Language Model (LLM).

Yes

Example request (OAS)
{
  "name": "generate_api_spec",
  "arguments": {
    "naturalLanguagePrompt": "Create a REST API for a pet store with endpoints to list pets, get pet by ID, create a new pet, update a pet, and delete a pet. Include proper error responses.",
    "language": "OAS",
    "languageVersion": "3.0",
    "projectType": "API_SPEC",
    "specSyntax": "yaml"
  }
}
Example request (RAML)
{
  "name": "generate_api_spec",
  "arguments": {
    "naturalLanguagePrompt": "Create a RAML 1.0 API for user management with authentication endpoints and user CRUD operations.",
    "language": "RAML",
    "languageVersion": "1.0",
    "projectType": "API_SPEC",
    "specSyntax": "RAML"
  }
}
Example response
{
  "success": true,
  "specContent": "openapi: 3.0.0\ninfo:\n  title: Pet Store API\n  version: 1.0.0\npaths:\n  /pets:\n    get:\n      summary: List all pets\n      responses:\n        '200':\n          description: Successful response\n    post:\n      summary: Create a new pet\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                name:\n                  type: string\n                category:\n                  type: string\n  /pets/{id}:\n    get:\n      summary: Get pet by ID\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Successful response\n        '404':\n          description: Pet not found",
  "message": "API spec generated successfully"
}

generate_mule_flow

Generate, modify, or enhance Mule flows. Use this tool for any request involving flow changes, including Java method calls, logging, Salesforce operations, adding connectors, transformations, or any flow modifications.

Parameter Description Required?

projectPath

Path to the existing Mule project directory.

Yes

projectXmlPath

Path to the existing Mule project XML file.

Yes

originalUserPrompt

The original user query without any modifications. Use for requests such as updating flows, adding Java methods, logging, Salesforce operations, connectors, or any flow changes.

Yes

Example request
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "generate_mule_flow",
  "arguments": {
    "projectPath": "/Users/developer/customer-integration-app",
    "projectXmlPath": "/Users/developer/customer-integration-app/src/main/mule/app.xml",
    "originalUserPrompt": "Add a flow that receives customer data via HTTP POST, validates the email format, transforms the data to match our internal schema, and saves it to Salesforce. Include error handling for validation failures."
  }
}
Example response
{
  "success": true,
  "projectPath": "/Users/developer/customer-integration-app",
  "flowsGenerated": [
    {
      "name": "customer-data-processing-flow",
      "description": "Processes incoming customer data with validation and Salesforce integration",
      "components": [
        "HTTP Listener",
        "Email Validator",
        "Transform Message",
        "Salesforce Create",
        "Error Handler"
      ]
    }
  ],
  "connectorsAdded": [
    "Salesforce Connector"
  ],
  "configurationsCreated": [
    "HTTP Listener Config",
    "Salesforce Config"
  ],
  "xmlUpdated": "/Users/developer/customer-integration-app/src/main/mule/app.xml",
  "message": "Mule flow generated successfully with customer data processing capabilities"
}

generate_munit_test

Generates MUnit test cases for Mule flows, one test scenario at a time, with support for mocks, assertions, and dependencies.

Parameter Description Required?

projectSource

The Mule flow definition, in XML format, for which an MUnit test needs to be generated. Do not include the namespace declaration. Only send the complete flow definition.

Yes

munitFileName

The file name of the MUnit test.

Yes

prompt

A prompt that explains the validation of the test case, for example, "Verify the flow returns a 400 error when an invalid payload is received."

Yes

minRuntimeVersion

The minimum runtime version required for the flow.

Yes

dependencies

A JSON object containing flow dependencies referenced by the main flow. The object must include flowDependencies: An array of flow dependency objects that contain the source (the source of the dependency) and`name` (the name of the dependency) properties.

Yes

Example request
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "generate_munit_test",
  "arguments": {
    "projectSource": "<flow name=\"customer-api-flow\" doc:id=\"abc123\">\n  <http:listener doc:name=\"Listener\" doc:id=\"def456\" config-ref=\"HTTP_Listener_config\" path=\"/customers/{customerId}\" allowedMethods=\"GET\"/>\n  <logger level=\"INFO\" doc:name=\"Log Request\" doc:id=\"ghi789\" message=\"Processing request for customer: #[attributes.uriParams.customerId]\"/>\n  <flow-ref doc:name=\"validate-customer-id\" doc:id=\"jkl012\" name=\"validate-customer-id\"/>\n  <db:select doc:name=\"Get Customer\" doc:id=\"mno345\" config-ref=\"Database_Config\">\n    <db:sql><![CDATA[SELECT * FROM customers WHERE id = :customerId]]></db:sql>\n    <db:input-parameters><![CDATA[#[{customerId: attributes.uriParams.customerId}]]]></db:input-parameters>\n  </db:select>\n  <choice doc:name=\"Choice\" doc:id=\"pqr678\">\n    <when expression=\"#[sizeOf(payload) > 0]\">\n      <ee:transform doc:name=\"Transform Customer\" doc:id=\"stu901\">\n        <ee:message>\n          <ee:set-payload><![CDATA[%dw 2.0\noutput application/json\n---\n{\n  id: payload[0].id,\n  name: payload[0].name,\n  email: payload[0].email,\n  status: \"active\"\n}]]></ee:set-payload>\n        </ee:message>\n      </ee:transform>\n    </when>\n    <otherwise>\n      <set-payload value='#[{\"error\": \"Customer not found\"}]' doc:name=\"Customer Not Found\" doc:id=\"vwx234\"/>\n      <set-variable value=\"404\" doc:name=\"Set Status\" doc:id=\"yz567\" variableName=\"httpStatus\"/>\n    </otherwise>\n  </choice>\n</flow>",
    "munitFileName": "customer-api-test-suite.xml",
    "prompt": "Generate a successful test case that verifies the flow returns customer data when a valid customer ID is provided. The test should mock the database response and validate the JSON transformation output.",
    "minMuleVersion": "4.5.0",
    "dependencies": {
      "flowDependencies": [
        {
          "source": "<sub-flow name=\"validate-customer-id\" doc:id=\"validate123\">\n  <validation:is-not-empty doc:name=\"Validate ID Not Empty\" doc:id=\"val456\" value=\"#[attributes.uriParams.customerId]\" message=\"Customer ID is required\"/>\n  <validation:matches-regex doc:name=\"Validate ID Format\" doc:id=\"val789\" value=\"#[attributes.uriParams.customerId]\" regex=\"^[0-9]+$\" message=\"Customer ID must be numeric\"/>\n</sub-flow>",
          "name": "validate-customer-id"
        }
      ]
    }
  }
}
Example response
{
  "success": true,
  "message": "MUnit test case generated successfully",
  "details": {
    "testCaseName": "customer-api-flow-successful-retrieval",
    "munitFileName": "customer-api-test-suite.xml",
    "testFilePath": "src/test/munit/customer-api-test-suite.xml",
    "generatedTestCase": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mule xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n     xmlns:munit=\"http://www.mulesoft.org/schema/mule/munit\"\n     xmlns:munit-tools=\"http://www.mulesoft.org/schema/mule/munit-tools\"\n     xmlns:db=\"http://www.mulesoft.org/schema/mule/db\"\n     xmlns=\"http://www.mulesoft.org/schema/mule/core\"\n     xsi:schemaLocation=\"http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd\n                         http://www.mulesoft.org/schema/mule/munit http://www.mulesoft.org/schema/mule/munit/current/mule-munit.xsd\n                         http://www.mulesoft.org/schema/mule/munit-tools http://www.mulesoft.org/schema/mule/munit-tools/current/mule-munit-tools.xsd\n                         http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd\">\n\n  <munit:config name=\"customer-api-test-suite.xml\"/>\n\n  <munit:test name=\"customer-api-flow-successful-retrieval\" description=\"Verify the flow returns customer data when a valid customer ID is provided\">\n    <!-- Test Setup -->\n    <munit:behavior>\n      <set-variable variableName=\"testCustomerId\" value=\"12345\"/>\n      <munit-tools:mock-when doc:name=\"Mock Database Response\" processor=\"db:select\">\n        <munit-tools:with-attributes>\n          <munit-tools:with-attribute whereValue=\"mno345\" attributeName=\"doc:id\"/>\n        </munit-tools:with-attributes>\n        <munit-tools:then-return>\n          <munit-tools:payload value='#[[{\"id\": 12345, \"name\": \"John Doe\", \"email\": \"john.doe@example.com\"}]]'/>\n        </munit-tools:then-return>\n      </munit-tools:mock-when>\n    </munit:behavior>\n\n    <!-- Test Execution -->\n    <munit:execution>\n      <flow-ref name=\"customer-api-flow\"/>\n    </munit:execution>\n\n    <!-- Test Verification -->\n    <munit:validation>\n      <munit-tools:assert-that doc:name=\"Assert Payload is Not Empty\" expression=\"#[payload]\" is=\"#[MunitTools::notNullValue()]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Customer ID\" actual=\"#[payload.id]\" expected=\"#[12345]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Customer Name\" actual=\"#[payload.name]\" expected=\"#[\\\"John Doe\\\"]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Customer Email\" actual=\"#[payload.email]\" expected=\"#[\\\"john.doe@example.com\\\"]\"/>\n      <munit-tools:assert-equals doc:name=\"Assert Customer Status\" actual=\"#[payload.status]\" expected=\"#[\\\"active\\\"]\"/>\n    </munit:validation>\n  </munit:test>\n\n</mule>",
    "mockComponents": [
      {
        "component": "db:select",
        "docId": "mno345",
        "mockType": "database_response",
        "description": "Mocks database query response for customer retrieval"
      }
    ],
    "assertions": [
      {
        "type": "not_null",
        "target": "payload",
        "description": "Verifies response payload is not null"
      },
      {
        "type": "equals",
        "target": "payload.id",
        "expected": "12345",
        "description": "Validates customer ID in response"
      },
      {
        "type": "equals",
        "target": "payload.name",
        "expected": "John Doe",
        "description": "Validates customer name in response"
      },
      {
        "type": "equals",
        "target": "payload.email",
        "expected": "john.doe@example.com",
        "description": "Validates customer email in response"
      },
      {
        "type": "equals",
        "target": "payload.status",
        "expected": "active",
        "description": "Validates customer status in response"
      }
    ],
    "testScenario": "successful_retrieval",
    "nextSteps": [
      "Append this test case to the MUnit test file",
      "Generate additional test cases for error scenarios",
      "Run the test to verify it passes",
      "Add more assertions if needed for complete coverage"
    ]
  }
}

get_flex_gateway_policy_example

Get a Flex Gateway policy example to help you configure your Rust source code. Use this tool to get example policies that manipulate a request’s header and body, make HTTP and gRPC calls to external services, share data between requests and responses, reject requests, perform sleep operations, and use PDK libraries.

Parameter Description Required?

feature

The type of policy feature to generate an example for. Valid values are:

  • authentication to propagate authentication information to other policies.

  • body_manipulation to read or update request/response body.

  • body_stream to read request/response body by chunks.

  • cache to use the cache library to share data across workers.

  • contracts to authenticate and authorize against the management plane.

  • control_flow to stop the request flow and generate a custom response.

  • cors to use the Cross-Origin Resource Sharing library.

  • dataweave to define and evaluate custom DataWeave expressions.

  • grpc to make a gRPC call to an external service.

  • header_manipulation to perform CRUD operations for request/response headers.

  • http_call to make an HTTP call to an external service.

  • jwt to parse and validate JSON Web Tokens.

  • lock to synchronize workers.

  • logger to print custom messages.

  • metadata to access metadata of the policy, API, and environment.

  • policy_violation to mark requests as violations in monitoring traffic.

  • request_data to share data between requests and responses.

  • timer to perform sleep operations.

  • worker_variable to share data across requests of a single worker.

Yes

Example request
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "get_flex_gateway_policy_example",
  "arguments": {
    "feature": "header_manipulation"
  }
}
Example response
{
  "success": true,
  "feature": "header_manipulation",
  "exampleCode": [
  "use pdk::api::*;",
  "use pdk::logger::info;",
  "",
  "#[entrypoint]",
  "async fn configure(launcher: Launcher) -> Result<(), LaunchError> {",
  "    let filter = on_request(|request| {",
  "        // Add custom header to request",
  "        request.headers_mut().insert(",
  "            \"X-Custom-Header\",",
  "            \"custom-value\".parse().unwrap()",
  "        );",
  "        ",
  "        // Log the operation",
  "        info!(\"Added custom header to request\");",
  "        ",
  "        Ok(request)",
  "    });",
  "    ",
  "    launcher.launch(filter).await",
  "}",
  "",
  "#[cfg(test)]",
  "mod tests {",
  "    use super::*;",
  "    use pdk::test::*;",
  "    ",
  "    #[tokio::test]",
  "    async fn test_header_manipulation() {",
  "        let request = TestRequestBuilder::new()",
  "            .method(\"GET\")",
  "            .uri(\"/api/test\")",
  "            .build();",
  "            ",
  "        let response = execute_policy(request).await.unwrap();",
  "        ",
  "        assert!(response.headers().contains_key(\"X-Custom-Header\"));",
  "        assert_eq!(",
  "            response.headers()[\"X-Custom-Header\"],",
  "            \"custom-value\"",
  "        );",
  "    }",
  "}"
],
  "description": "Example Rust policy for manipulating request headers using the Flex Gateway Policy Development Kit (PDK)",
  "dependencies": [
    "pdk = { version = \"0.1.0\" }",
    "tokio = { version = \"1.0\", features = [\"full\"] }"
  ],
  "explanation": "This example demonstrates how to add custom headers to incoming requests using the PDK API. The policy uses the on_request filter to intercept requests and modify headers before they reach the backend service."
}

get_platform_insights

See how your organization leverages Anypoint Platform through usage and operational insights. These include:

  • Usage trends for apps, such as flow count, message counts, and data throughput by business group and environment. Usage trends are for the current month. If it’s early in the month, you get usage for the last full month.

  • API and app call volume across consumers for the last 7 days.

  • API and app performance metrics such as errors and latency for the last 7 days.

Parameter Description Required?

entityName

Name of the application or API.

No

entityType

Type of entity to get insights for. Use application for Mule applications or api for APIs.

No

includeFlows

Whether to include app usage trends for flows. The default value is false.

No

includeMessages

Whether to include app usage trends for messages. The default value is false.

No

includeDataThroughput

Whether to include app usage trends for data throughput. The default value is false.

No

includeErrorCount

Whether to include error counts from apps and APIs. The default value is false.

No

includeCallVolume

Whether to include call volume from apps and APIs. The default value is false.

No

includeLatency

Whether to include P99 latency in the response time. The default value is false.

No

latencyPercentile

If includeLatency=true, this parameter specifies which percentile to use for latency measurements. Valid values are:

  • P99 for 99th percentile

  • P95 for 95th percentile

  • P90 for 90th percentile

  • P75 for 75th percentile

The default value is P99.

No

Example request (organization overview)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "get_platform_insights",
  "arguments": {
    "includeFlows": true,
    "includeMessages": true,
    "includeDataThroughput": true,
    "includeCallVolume": true,
    "includeLatency": true,
    "latencyPercentile": "P95"
  }
}
Example request (specific application)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "get_platform_insights",
  "arguments": {
    "entityName": "customer-integration-app",
    "entityType": "application",
    "includeErrorCount": true,
    "includeCallVolume": true,
    "includeLatency": true
  }
}
Example response
{
  "success": true,
  "timeRange": {
    "usageTrends": "2024-01-01 to 2024-01-31",
    "performanceMetrics": "2024-01-24 to 2024-01-31"
  },
  "usageTrends": {
    "flows": {
      "totalFlows": 245,
      "activeFlows": 198,
      "flowsById": [
        {
          "businessGroup": "Sales",
          "environment": "Production",
          "flowCount": 45
        },
        {
          "businessGroup": "Marketing",
          "environment": "Production",
          "flowCount": 32
        }
      ]
    },
    "messages": {
      "totalMessages": 1250000,
      "messagesByBusinessGroup": [
        {
          "businessGroup": "Sales",
          "messageCount": 650000
        },
        {
          "businessGroup": "Marketing",
          "messageCount": 400000
        }
      ]
    },
    "dataThroughput": {
      "totalGB": 125.5,
      "throughputByEnvironment": [
        {
          "environment": "Production",
          "throughputGB": 98.2
        },
        {
          "environment": "Staging",
          "throughputGB": 27.3
        }
      ]
    }
  },
  "performanceMetrics": {
    "callVolume": {
      "totalCalls": 875000,
      "dailyAverage": 125000,
      "topConsumers": [
        {
          "consumerName": "Mobile App",
          "calls": 325000
        },
        {
          "consumerName": "Web Portal",
          "calls": 250000
        }
      ]
    },
    "latency": {
      "percentile": "P95",
      "averageLatencyMs": 145,
      "latencyByApp": [
        {
          "appName": "customer-integration-app",
          "p95LatencyMs": 89
        }
      ]
    },
    "errors": {
      "totalErrors": 1250,
      "errorRate": 0.14,
      "errorsByType": [
        {
          "errorType": "Timeout",
          "count": 450
        },
        {
          "errorType": "Connection",
          "count": 320
        }
      ]
    }
  }
}

get_reuse_metrics

Get visibility into assets reuse across your organization. Drive efficiency, consistency, and cost savings by reducing duplication. Includes sandbox and production environments. Metrics are a year-to-date snapshot.

Parameter Description Required?

includeReuseMetrics

Whether the output includes reuse metrics for applications. Default is false.

No

Example request
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "get_reuse_metrics",
  "arguments": {
    "includeReuseMetrics": true
  }
}
Example response
{
  "success": true,
  "reportingPeriod": "2024 Year-to-Date",
  "summary": {
    "totalAssets": 156,
    "reusedAssets": 89,
    "reuseRate": "57%",
    "costSavingsEstimate": "$45,000"
  },
  "reuseMetrics": {
    "byAssetType": [
      {
        "assetType": "mule-application",
        "totalAssets": 45,
        "reusedAssets": 28,
        "reuseRate": "62%",
        "avgReusesPerAsset": 3.2
      },
      {
        "assetType": "raml",
        "totalAssets": 32,
        "reusedAssets": 25,
        "reuseRate": "78%",
        "avgReusesPerAsset": 4.1
      },
      {
        "assetType": "connector",
        "totalAssets": 18,
        "reusedAssets": 15,
        "reuseRate": "83%",
        "avgReusesPerAsset": 5.7
      }
    ],
    "byBusinessGroup": [
      {
        "businessGroup": "Sales",
        "assetsCreated": 34,
        "assetsReused": 67,
        "reuseRatio": 1.97
      },
      {
        "businessGroup": "Marketing",
        "assetsCreated": 28,
        "assetsReused": 45,
        "reuseRatio": 1.61
      }
    ],
    "topReusedAssets": [
      {
        "assetName": "Customer API",
        "assetType": "raml",
        "reuseCount": 12,
        "lastReused": "2024-01-28"
      },
      {
        "assetName": "HTTP Basic Auth Policy",
        "assetType": "policy",
        "reuseCount": 8,
        "lastReused": "2024-01-30"
      }
    ]
  },
  "environments": ["Production", "Staging", "Development"],
  "recommendations": [
    "Consider promoting 'Payment Processing Flow' template to Exchange for wider reuse",
    "Customer API shows high reuse - consider creating additional variants",
    "15 assets have not been reused - review for consolidation opportunities"
  ]
}

get_topics_agent_actions_metadata_instructions

Get metadata and instructions for enabling topics and agent actions from an OpenAI spec. Topics are bundles of actions and sets of instructions agents use to complete tasks. Actions are tasks that the agent can do, and instructions help the agent understand how to use actions.

Available only in Anypoint Code Builder.

This tool has no parameters.

Example request
{
  "name": "get_topics_agent_actions_metadata_instructions",
  "arguments": {}
}
Example response
{
  "topics": [
    {
      "id": "api-management",
      "name": "API Management",
      "description": "Topics related to API management operations",
      "actions": [
        {
          "id": "create-api",
          "name": "Create API",
          "description": "Create a new API specification",
          "instructions": "Use this action to create a new API specification. Provide the API name, version, and specification format."
        }
      ],
      "instructions": "Use these actions to manage APIs in your organization."
    }
  ],
  "metadata": {
    "version": "1.0.0",
    "lastUpdated": "2024-01-15T10:30:00Z"
  }
}

implement_api_spec

Use APIkit flows to implement an API specification in a new integration project. You can implement a specification from a local project or an Anypoint Exchange asset.

Parameter Description Required?

mode

Determines the operation type. To implement API specs in a local workspace, use local_scaffolding mode. For APIs published to Anypoint Exchange, use exchange_api_scaffolding.

Yes

projectName

The name for the integration project. Also used as the project folder name.

Yes

projectLocation

The path where the project folder is located. The default is the current workspace.

Yes

projectPath

[local_scaffolding mode] The absolute path to the local API project to scaffold. The API project must contain a valid exchange.json and classifier.

Yes

groupId

[exchange_api_scaffolding mode] The group ID of the API specification in Anypoint Exchange.

Yes

assetId

[exchange_api_scaffolding mode] The asset ID of the API specification in Anypoint Exchange.

Yes

version

[exchange_api_scaffolding mode] The version of the API specification, for example '1.4.0'.

Yes

classifier

[exchange_api_scaffolding mode] The classifier of the API specification. Fetched from Anypoint Exchange if not provided.

No

type

[exchange_api_scaffolding mode] The type or packaging of the API specification. Fetched from Anypoint Exchange if not provided.

No

main

[exchange_api_scaffolding mode] The main file of the API specification. Fetched from Anypoint Exchange if not provided.

No

runtimeVersion

The runtime version to use. Uses the workspace configuration or the latest version available if not specified.

No

jdkVersion

The JDK version to use. Uses the workspace configuration or the latest available if not specified.

No

mavenGroupId

The Maven group ID for the project. Defaults to the group ID of the API specification or workspace setting.

No

Example request
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "implement_api_spec",
  "arguments": {
    "groupId": "com.acme.apis",
    "assetId": "customer-management-api",
    "version": "1.2.0",
    "projectName": "customer-management-implementation",
    "projectLocation": "/Users/developer/mule-projects",
    "classifier": "raml",
    "type": "zip",
    "main": "api.raml",
    "runtimeVersion": "4.6.0",
    "jdkVersion": "17",
    "mavenGroupId": "com.acme.implementations"
  }
}
Example response
{
  "success": true,
  "message": "Mule project successfully scaffolded from API specification",
  "details": {
    "projectPath": "/Users/developer/mule-projects/customer-management-implementation",
    "apiSpecification": {
      "groupId": "com.acme.apis",
      "assetId": "customer-management-api",
      "version": "1.2.0",
      "classifier": "raml",
      "mainFile": "api.raml"
    },
    "projectConfiguration": {
      "name": "customer-management-implementation",
      "runtimeVersion": "4.6.0",
      "jdkVersion": "17",
      "mavenGroupId": "com.acme.implementations",
      "artifactId": "customer-management-implementation"
    },
    "generatedFiles": [
      "pom.xml",
      "mule-artifact.json",
      "src/main/mule/implementation.xml",
      "src/main/resources/api/api.raml",
      "src/main/resources/application.yaml",
      "src/test/munit/implementation-test-suite.xml"
    ],
    "endpoints": [
      {
        "method": "GET",
        "path": "/customers",
        "description": "Get all customers"
      },
      {
        "method": "POST",
        "path": "/customers",
        "description": "Create a new customer"
      },
      {
        "method": "GET",
        "path": "/customers/{customerId}",
        "description": "Get customer by ID"
      },
      {
        "method": "PUT",
        "path": "/customers/{customerId}",
        "description": "Update customer"
      },
      {
        "method": "DELETE",
        "path": "/customers/{customerId}",
        "description": "Delete customer"
      }
    ],
    "nextSteps": [
      "Open the project in your workspace using the open_project tool",
      "Implement business logic for each endpoint",
      "Configure database connections if needed",
      "Add error handling and validation",
      "Test the implementation using MUnit"
    ]
  }
}

list_api_instances

Get information for instances in an environment. You can also filter by an instance ID or label and include applied or available policies. Use the page parameter to paginate results.

Prompt tip: To get information for all instances, revise results using the page parameter.

Parameter Description Required?

organizationId

ID of the organization where instances reside. Default is the ID of the default organization.

No

environmentName

Name of the environment where instances reside. Default is the name of the default environment for the organization specified in organizationId.

No

apiInstanceId

Instance ID of the API.

No

Required if includeAvailablePolicies=true.

apiInstanceLabel

Label or name of the API instance.

No

page

Page number of the results. Each page contains information for up to 10 instances.

Yes

includeAppliedPolicies

Whether to include applied policies in results.

No

includeAvailablePolicies

Whether to include available policies in results. Requires apiInstanceId.

No

Example request (list all instances)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "list_api_instances",
  "arguments": {
    "environmentName": "Production",
    "page": 1,
    "includeAppliedPolicies": true
  }
}
Example request (specific instance with available policies)
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "list_api_instances",
  "arguments": {
    "environmentName": "Production",
    "apiInstanceId": "12345",
    "page": 1,
    "includeAppliedPolicies": true,
    "includeAvailablePolicies": true
  }
}
Example response
{
  "success": true,
  "environmentName": "Production",
  "page": 1,
  "totalPages": 3,
  "totalInstances": 25,
  "instances": [
    {
      "apiInstanceId": "12345",
      "apiInstanceLabel": "Customer Management API",
      "assetId": "customer-api",
      "assetVersion": "1.0.0",
      "groupId": "com.mycompany.apis",
      "runtimeEngine": "mule4",
      "endpointUri": "https://backend.example.com/api/customers",
      "consumerEndpoint": "https://api.example.com/customers",
      "status": "active",
      "appliedPolicies": [
        {
          "policyId": "rate-limiting-001",
          "policyName": "Rate Limiting",
          "version": "1.2.0",
          "status": "applied"
        },
        {
          "policyId": "basic-auth-002",
          "policyName": "HTTP Basic Authentication",
          "version": "1.0.0",
          "status": "applied"
        }
      ],
      "availablePolicies": [
        {
          "policyName": "OAuth 2.0 Access Token Enforcement",
          "assetId": "oauth-2-access-token-enforcement",
          "groupId": "68ef9520-24e9-4cf2-b2f5-620025690913",
          "version": "3.2.2",
          "description": "Validates OAuth 2.0 access tokens"
        }
      ]
    },
    {
      "apiInstanceId": "67890",
      "apiInstanceLabel": "Product Catalog API",
      "assetId": "product-api",
      "assetVersion": "2.1.0",
      "groupId": "com.mycompany.apis",
      "runtimeEngine": "mule4",
      "endpointUri": "https://backend.example.com/api/products",
      "consumerEndpoint": "https://api.example.com/products",
      "status": "active",
      "appliedPolicies": []
    }
  ]
}

uc_generate_api_spec

Generate an OpenAPI 3.0 spec from use cases and API documentation. Analyzes documentation sources, discovers endpoints for the specified use cases, and creates both a discovery.json file and a complete OpenAPI YAML spec. If no parameters are used, the agent prompts for input.

Available only in Connector Builder.

Parameter Description Required?

platform

Name of the SaaS platform or service, for example, Salesforce, ServiceNow, PayPal, or Stripe.

No

useCases

List of integration use cases, ordered by priority. Each use case describes a specific integration scenario, for example, Sync customer data or Process invoices. If specified, a minimum of one is required.

No

documentation

List of official API documentation URLs. Must be valid URLs starting with http:// or https://, for example, https://developers.stripe.com/api. If specified, a minimum of one is required.

No

additionalRequirements

Any additional requirements, constraints, or preferences for the API spec, for example, specific authentication methods, rate limiting considerations, and version preferences.

No

userConfirmed

Confirmation that all provided information is correct and ready for processing.

No

Example request
{
  "name": "uc_generate_api_spec",
  "arguments": {
    "platform": "Stripe",
    "useCases": [
      "Sync customers into our CRM",
      "Create a charge and issue a refund"
    ],
    "documentation": [
      "https://docs.stripe.com/api",
      "https://docs.stripe.com/api/customers",
      "https://docs.stripe.com/api/charges",
      "https://docs.stripe.com/api/refunds"
    ],
    "additionalRequirements": "OpenAPI 3.0 YAML. Use bearer token auth (Authorization: Bearer <apiKey>). Include common error responses (400/401/403/404/409/429/500). Model pagination where applicable.",
    "userConfirmed": true
  }
}
Example response
{
  "success": true,
  "message": "Generated discovery.json and OpenAPI 3.0 spec from documentation and use cases.",
  "platform": "Stripe",
  "discoveryJsonPath": "/Users/you/workspace/stripe-spec/discovery.json",
  "openApiYamlPath": "/Users/you/workspace/stripe-spec/openapi.yaml"
}

uc_generate_connector

Generate a complete LinkWeave connector from an API spec. Supports flexible multi-phase generation including scaffolding, CCM (Canonical Connectivity Model), and Anypoint Connector. All endpoints from the API spec are used. Can execute phases individually or in combination.

Available only in Connector Builder.

Parameter Description Required?

apiSpec

Absolute path to the API spec file (OpenAPI/Swagger YAML or JSON).

No

Required for ccm phase.

projectName

Name for the connector project.

No

Required for ccm phase.

description

Description for the connector project.

No

Required for ccm phase.

phases

Array of phases to execute - any combination of ccm and anypoint. Phases execute in order. Valid values are:

  • ccm for Canonical Connectivity Model

  • anypoint for Anypoint Connector

No

Example request
{
  "tool_name": "uc_generate_connector",
  "arguments": {
    "apiSpec": "/Users/developer/apis/salesforce-api.yaml",
    "projectName": "Salesforce Integration Connector",
    "description": "Custom connector for Salesforce CRM integration with enhanced features.",
    "phases": ["ccm"]
  }
}
Example response
{
  "success": true,
  "message": "Connector generated successfully.",
  "projectPath": "/Users/you/workspace/stripe-connector",
  "phasesExecuted": [
    "ccm",
    "anypoint"
  ]
}

update_mule_application

Update a Mule application deployed to CloudHub 2.0 or Runtime Fabric. Update runtime version, configuration, and other application settings.

Parameter Description Required?

applicationId

The ID of the application to update with the latest Mule runtime patch release.

Yes

environmentId

The ID of the environment where the application is deployed.

Yes

organizationId

The ID of the organization where the application is deployed.

No

runtimeVersion

Mule runtime version to use. For example, 4.9.4:2e-java17.

No

hasPersistentObjectStore

Whether to enable persistent object store. The default is false.

No

replicaSize

Replica size for CloudHub 2.0 applications. Express size in vCores or instance type size.

No

cpuReserved

Reserved vCPUs for the application. For example, 1.

No

cpuLimit

Maximum vCPUs for the application. For example, 2.

No

memory

Memory allocation for the allocation in GB. For example, 1.

No

replicas

Number of replicas.

No

minReplicas

If hasHighAvailability=true or hasPerformanceOptimization=true, this value is the minimum number of replicas.

No

maxReplicas

If hasHighAvailability=true or hasPerformanceOptimization=true, this value is the maximum number of replicas.

No

hasAutoscaling

Whether to enable autoscaling. The default is false.

No

hasTracing

Whether to enable application tracing. The default is false.

No

enforceDeployingReplicasAcrossNodes

Whether to enforce deploying replicas across nodes (Runtime Fabric only). The default is false.

No

deploymentModel

The deployment strategy for application updates. Use rolling for zero-downtime rolling updates or recreate to stop and restart all instances.

No

hasClustering

Whether to enable clustering for the application. The default is false.

No

stopApplication

Whether to stop the application. The default is false.

No

startApplication

Whether to start the application. The default is false.

No

hasHighAvailability

Whether to enable high availability for the application. The default is false.

No

hasPerformanceOptimization

Whether to enable performance optimization. The default is false.

No

isSecure

Whether to enable advanced security features. The default is false.

No

Example request
{
  "name": "update_mule_application",
  "arguments": {
    "applicationId": "3f2d8b1a-0f2e-4f6c-9e44-6f3b2c1a9c10",
    "environmentId": "b7c9f6f2-1f8d-4c2e-a7b0-3d6c9a1b2e34",
    "runtimeVersion": "4.9.4:2e-java17",
    "replicaSize": "0.5",
    "replicas": 2,
    "hasAutoscaling": true,
    "minReplicas": 2,
    "maxReplicas": 4,
    "hasTracing": true,
    "deploymentModel": "rolling"
  }
}
Example response
{
  "success": true,
  "message": "Application update initiated.",
  "applicationId": "3f2d8b1a-0f2e-4f6c-9e44-6f3b2c1a9c10",
  "environmentId": "b7c9f6f2-1f8d-4c2e-a7b0-3d6c9a1b2e34",
  "deploymentModel": "rolling",
  "status": "updating"
}

validate_api_against_ruleset

Validate an API specification in your project against governance rulesets or rules that you specify. If you specify all rulesets, the tool uses an empty rules parameter to validate all rulesets. Similarly, if you specify no ruleset, the tool uses an empty rules parameter. To find rules or rulesets that you specify, this tool calls the list_governance_rulesets tool.

Available only in Anypoint Code Builder.

Parameter Description Required?

projectPath

Path where the project folder is located. The default is the current workspace. For absolute paths, use file: followed by three slash characters.

No

rules

Array of API rules to validate. If empty, the tool validates all rulesets in projectPath.

No

syncCentralizedRulesets

Whether the tool syncs centralized rulesets before validating the API specification. The default value is true.

No

Example request (validate all rulesets)
{
  "name": "validate_api_against_ruleset",
  "arguments": {
    "projectPath": "/Users/developer/projects/pet-store-api",
    "rules": [],
    "syncCentralizedRulesets": true
  }
}
Example request (validate specific rules)
{
  "name": "validate_api_against_ruleset",
  "arguments": {
    "projectPath": "/Users/developer/projects/pet-store-api",
    "rules": [
      {
        "name": "api-title-required",
        "rulePath": "/Users/developer/.mule/rulesets/api-governance-ruleset/rules/api-title-required.js"
      },
      {
        "name": "api-version-required",
        "rulePath": "/Users/developer/.mule/rulesets/api-governance-ruleset/rules/api-version-required.js"
      }
    ],
    "syncCentralizedRulesets": true
  }
}
Example response
{
  "validationResults": {
    "totalRules": 2,
    "passed": 1,
    "failed": 1,
    "warnings": 0
  },
  "results": [
    {
      "ruleName": "api-title-required",
      "status": "passed",
      "message": "API title is present"
    },
    {
      "ruleName": "api-version-required",
      "status": "failed",
      "message": "API version is missing",
      "severity": "error",
      "location": {
        "file": "pet-store-api.yaml",
        "line": 2,
        "column": 5
      }
    }
  ],
  "summary": "Validation completed with 1 error"
}

validate_project

Validate the current project. For example, an API spec or an agent network project. This tool doesn’t validate against API Governance rulesets. To validate against those rulesets, use the validate_api_against_ruleset tool.

Available only in Anypoint Code Builder.

Parameter Description Required?

projectPath

Path where the project folder is located. The default is the current workspace. For absolute paths, use file: followed by three slash characters, for example, file:///Users/myUser/workspace/.

No

Example request
{
  "name": "validate_project",
  "arguments": {
    "projectPath": "/Users/developer/projects/pet-store-api"
  }
}
Example response
{
  "success": true,
  "projectType": "api-spec",
  "validationResults": {
    "syntaxValid": true,
    "structureValid": true,
    "errors": [],
    "warnings": [
      {
        "message": "Missing description for endpoint /pets",
        "location": {
          "file": "pet-store-api.yaml",
          "line": 15
        }
      }
    ]
  },
  "message": "Project validation completed successfully"
}