---
schema_version: "1"
id: 60d76c67361d0b5a7e4149b6d0d17e35521c3a6100af0f32e11609439cc9803d
title: MuleSoft DX MCP Server Tool Reference
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mulesoft-mcp-server/reference-mcp-tools.md
canonical_url: https://docs.mulesoft.com/mulesoft-mcp-server/reference-mcp-tools
source_site: docs.mulesoft.com
content_type: documentation
content_hash: d88dbe093811171e22dba063f0f6a98857c81ee6fa80662d5f0aa4e831a6ec3e
description: MuleSoft Documentation Site
latest: true
---
---
product: MuleSoft MCP Servers
---

# MuleSoft DX MCP Server Tool Reference

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

MuleSoft DX MCP Server exposes tools for developing agent networks, building applications, creating
connectors, managing deployments, governing APIs, and more. Each tool accepts specific parameters so
assistants can automate tasks across Anypoint Platform APIs. Run them from your IDE to speed up
delivery, tighten governance, and surface operational insight for your integrations.

> [!NOTE] Some MuleSoft DX MCP Server tools are available only in the Anypoint Code Builder IDE or
> Connector Builder.

See [Create a Connected App](https://docs.mulesoft.com/mulesoft-mcp-server/getting-started#create-a-connected-app) for information about which
tools require specific permission scopes.

## Command Summary

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Category</th><th>Tool</th><th>Anypoint Code Builder Only</th><th>Connector Builder Only</th><th>Required Permission Scopes</th></tr></thead><tbody><tr><td rowspan="4"><p><strong>Agent Network Development</strong></p></td><td><p><a href="#configure-agent-network-yaml">configure_agent_network_yaml</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#create-agent-network-project">create_agent_network_project</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#deploy-agent-network">deploy_agent_network</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#publish-agent-network-assets">publish_agent_network_assets</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td rowspan="16"><p><strong>Application Development</strong></p></td><td><p><a href="#create-and-manage-assets">create_and_manage_assets</a></p></td><td><p>No</p></td><td><p>No</p></td><td><div><div><ul><li><p>Exchange: Exchange Administrator (<code>manage:exchange</code>)</p></li><li><p>Exchange: Exchange Contributor (<code>edit:exchange</code>)</p></li><li><p>Exchange: Exchange Creator (<code>create:exchange</code>)</p></li></ul></div></div></td></tr><tr><td><p><a href="#create-and-manage-metadata">create_and_manage_metadata</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#create-api-spec-project">create_api_spec_project</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#create-mcp-server">create_MCP_server</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>Anypoint Code Builder: Mule Developer Generative AI User (<code>create:generations</code>)</p></td></tr><tr><td><p><a href="#create-mule-project">create_mule_project</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#generate-api-spec">generate_api_spec</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>Anypoint Code Builder: Mule Developer Generative AI User (<code>create:generations</code>)</p></td></tr><tr><td><p><a href="#generate-mule-flow">generate_mule_flow</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>Anypoint Code Builder: Mule Developer Generative AI User (<code>create:generations</code>)</p></td></tr><tr><td><p><a href="#generate-or-modify-munit-test">generate_or_modify_munit_test</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>Anypoint Code Builder: Mule Developer Generative AI User (<code>create:generations</code>)</p></td></tr><tr><td><p><a href="#get-topics-agent-actions-metadata-instructions">get_topics_agent_actions_metadata_instructions</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#implement-api-spec">implement_api_spec</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>Exchange: Exchange Viewer (<code>read:exchange</code>)</p></td></tr><tr><td><p><a href="#mock-api-spec">mock_api_spec</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#open-project">open_project</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#run-local-mule-application">run_local_mule_application</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#search-asset">search_asset</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>Exchange: Exchange Viewer (<code>read:exchange</code>)</p></td></tr><tr><td><p><a href="#test-connection">test_connection</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#validate-project">validate_project</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td rowspan="9"><p><strong>Connector Development</strong></p></td><td><p><a href="#uc-add-pagination">uc_add_pagination</a></p></td><td><p>No</p></td><td><p>Yes</p></td><td><p>None</p></td></tr><tr><td><p><a href="#uc-connector-lifecycle">uc_connector_lifecycle</a></p></td><td><p>No</p></td><td><p>Yes</p></td><td><p>None</p></td></tr><tr><td><p><a href="#uc-create-connector-workflow">uc_create_connector_workflow</a></p></td><td><p>No</p></td><td><p>Yes</p></td><td><p>None</p></td></tr><tr><td><p><a href="#uc-generate-connector">uc_generate_connector</a></p></td><td><p>No</p></td><td><p>Yes</p></td><td><p>None</p></td></tr><tr><td><p><a href="#uc-generate-tests">uc_generate_tests</a></p></td><td><p>No</p></td><td><p>Yes</p></td><td><p>None</p></td></tr><tr><td><p><a href="#uc-get-test-generation-info">uc_get_test_generation_info</a></p></td><td><p>No</p></td><td><p>Yes</p></td><td><p>None</p></td></tr><tr><td><p><a href="#uc-list-connection-profiles">uc_list_connection_profiles</a></p></td><td><p>No</p></td><td><p>Yes</p></td><td><p>None</p></td></tr><tr><td><p><a href="#uc-manage-api-spec">uc_manage_api_spec</a></p></td><td><p>No</p></td><td><p>Yes</p></td><td><p>None</p></td></tr><tr><td><p><a href="#uc-manage-operations">uc_manage_operations</a></p></td><td><p>No</p></td><td><p>Yes</p></td><td><p>None</p></td></tr><tr><td rowspan="7"><p><strong>DataWeave Development</strong></p></td><td><p><a href="#dataweave-create-documentation">dataweave_create_documentation</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#dataweave-create-project">dataweave_create_project</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#dataweave-create-sample-data">dataweave_create_sample_data</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#dataweave-get-module-metadata">dataweave_get_module_metadata</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#dataweave-get-project-metadata">dataweave_get_project_metadata</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#dataweave-open-project">dataweave_open_project</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#dataweave-run-script-tool">dataweave_run_script_tool</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td rowspan="5"><p><strong>Application Management</strong></p></td><td><p><a href="#create-and-manage-api-instances">create_and_manage_api_instances</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>API Manager: Manage API Configuration (<code>manage:api_configuration</code>)</p></td></tr><tr><td><p><a href="#deploy-mule-application">deploy_mule_application</a></p></td><td><p>No</p></td><td><p>No</p></td><td><div><div><ul><li><p>Exchange: Exchange Viewer (<code>read:exchange</code>)</p></li><li><p>Runtime Manager: View Connected Applications (<code>read:orgconnapps</code>)</p></li><li><p>Runtime Manager: Create Applications (<code>create:applications</code>)</p></li><li><p>Runtime Manager: Read Runtime Fabrics (<code>read:runtime_fabrics</code>)</p></li></ul></div></div></td></tr><tr><td><p><a href="#list-api-instances">list_api_instances</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>API Manager: View APIs Configuration (<code>read:api_configuration</code>)</p></td></tr><tr><td><p><a href="#list-applications">list_applications</a></p></td><td><p>No</p></td><td><p>No</p></td><td><div><div><ul><li><p>Runtime Manager: Monitoring Viewer (<code>view:monitoring</code>)</p></li><li><p>Runtime Manager: View Connected Applications (<code>read:orgconnapps</code>)</p></li><li><p>Runtime Manager: Read Applications (<code>read:applications</code>)</p></li><li><p>Runtime Manager: Read Runtime Fabrics (<code>read:runtime_fabrics</code>)</p></li></ul></div></div></td></tr><tr><td><p><a href="#update-mule-application">update_mule_application</a></p></td><td><p>No</p></td><td><p>No</p></td><td><div><div><ul><li><p>General: View Organization (<code>read:organization</code>)</p></li><li><p>Runtime Manager: View Connected Applications (<code>read:orgconnapps</code>)</p></li><li><p>Runtime Manager: Create Applications (<code>create:applications</code>)</p></li></ul></div></div></td></tr><tr><td rowspan="3"><p><strong>Governance</strong></p></td><td><p><a href="#add-governance-ruleset">add_governance_ruleset</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#list-governance-rulesets">list_governance_rulesets</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#validate-api-against-ruleset">validate_api_against_ruleset</a></p></td><td><p>Yes</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td rowspan="3"><p><strong>Policy Management</strong></p></td><td><p><a href="#get-flex-gateway-policy-example">get_flex_gateway_policy_example</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td><p><a href="#manage-api-instance-policy">manage_api_instance_policy</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>API Manager: Manage Policies (<code>manage:api_policies</code>)</p></td></tr><tr><td><p><a href="#manage-flex-gateway-policy-project">manage_flex_gateway_policy_project</a></p></td><td><p>No</p></td><td><p>No</p></td><td><p>None</p></td></tr><tr><td rowspan="2"><p><strong>Usage and Insights</strong></p></td><td><p><a href="#get-platform-insights">get_platform_insights</a></p></td><td><p>No</p></td><td><p>No</p></td><td><div><div><ul><li><p>Runtime Manager: Monitoring Viewer (<code>view:monitoring</code>)</p></li><li><p>Runtime Manager: Read Runtime Fabrics (<code>read:runtime_fabrics</code>)</p></li><li><p>Runtime Manager: CloudHub Network Viewer (<code>read:cloudhub_networking</code>)</p></li><li><p>General: Usage Viewer (<code>view:metering</code>)</p></li><li><p>General: View Organization (<code>read:organization</code>)</p></li><li><p>API Manager: View APIs Configuration (<code>read:api_configuration</code>)</p></li></ul></div></div></td></tr><tr><td><p><a href="#get-reuse-metrics">get_reuse_metrics</a></p></td><td><p>No</p></td><td><p>No</p></td><td><div><div><ul><li><p>Runtime Manager: Monitoring Viewer (<code>view:monitoring</code>)</p></li><li><p>Runtime Manager: View Connected Applications (<code>read:orgconnapps</code>)</p></li><li><p>Runtime Manager: Read Runtime Fabrics (<code>read:runtime_fabrics</code>)</p></li><li><p>Runtime Manager: CloudHub Network Viewer (<code>read:cloudhub_networking</code>)</p></li><li><p>API Manager: View APIs Configuration (<code>read:api_configuration</code>)</p></li><li><p>General: Usage Viewer (<code>view:metering</code>)</p></li></ul></div></div></td></tr></tbody></table>

## 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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>assetId</code></p></td><td><p>The ID of the asset.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>groupId</code></p></td><td><p>Group ID of the asset in Anypoint Exchange.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>version</code></p></td><td><p>Version of the asset, for example, <code>1.4.0</code>.</p></td><td><p>Yes</p></td></tr></tbody></table>

Example request

```json
{
  "name": "add_governance_ruleset",
  "arguments": {
    "assetId": "api-governance-ruleset",
    "groupId": "com.mulesoft.governance",
    "version": "1.4.0"
  }
}
```

Example response

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>mode</code></p></td><td><p>The operation to perform on the agent network project YAML. Valid values are <code>configure</code> and <code>edit</code>.</p><p>For example, use <code>configure</code> to set up a custom agent network tailored to your environment, discover agent network components, or scaffold a new agent network. Use <code>edit</code> to make minor changes to a configured agent network YAML file, such as renaming an existing agent.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>prompt</code></p></td><td><p>Prompt from the user containing instructions to the agent.</p></td><td><p>Yes</p></td></tr></tbody></table>

Example request (configure mode)

```json
{
  "name": "configure_agent_network_yaml",
  "arguments": {
    "prompt": "configure this agent network with a new agent called 'api-manager'",
    "mode": "configure"
  }
}
```

Example request (edit mode)

```json
{
  "name": "configure_agent_network_yaml",
  "arguments": {
    "prompt": "remove the connection between agent1 and agent2",
    "mode": "edit"
  }
}
```

Example response

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectName</code></p></td><td><p>Unique name of the project, also used as the name of the agent network project file.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>projectPath</code></p></td><td><p>Parent location of the project. The default is the parent folder of the current workspace. The project resides in a subfolder of <code>projectPath</code>.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>projectDescription</code></p></td><td><p>Description of the project.</p></td><td><p>No</p></td></tr><tr><td><p><code>groupId</code></p></td><td><p>Organization or business group ID of the project.</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "name": "create_agent_network_project",
  "arguments": {
    "projectName": "my-agent-network",
    "projectPath": "/Users/developer/projects",
    "projectDescription": "A sample agent network for API management"
  }
}
```

Example response

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>organizationId</code></p></td><td><div><div><p>The ID of the organization where the instance resides. The default is the ID of the user’s organization from the current session.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>environmentName</code></p></td><td><div><div><p>The name of the environment where the instance resides. The default is the environment for the organization specified in <code>organizationId</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>apiInstanceId</code></p></td><td><div><div><p>Instance ID of the API.</p></div></div></td><td><p>No</p><p>Required if you’re configuring an API instance.</p></td></tr><tr><td><p><code>apiInstanceLabel</code></p></td><td><div><div><p>Label or name of the API instance.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>operation</code></p></td><td><div><div><p>Operation to perform on the API instance. Valid values are:</p></div><div><ul><li><p><code>create</code> to create an API instance.</p></li><li><p><code>configureBasicEndpointInMuleApplication</code> to configure a basic endpoint in a Mule application.</p></li></ul></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>groupId</code></p></td><td><div><div><p>Group ID of the API asset in Anypoint Exchange.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>assetId</code></p></td><td><div><div><p>ID of the API asset in Anypoint Exchange. Value can be the API name.</p></div></div></td><td><p>No</p><p>Required to create an API instance.</p></td></tr><tr><td><p><code>assetVersion</code></p></td><td><div><div><p>Version of the API asset in Anypoint Exchange.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>runtimeEngine</code></p></td><td><div><div><p>Engine the API instance runs on. Valid value is <code>mule4</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>muleProxyType</code></p></td><td><div><div><p>Valid value is <code>basicEndpoint</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>endpointUri</code></p></td><td><div><div><p>Endpoint URI of the API instance (upstream).</p></div></div></td><td><p>No</p><p>Required if <code>muleProxyType=basicEndpoint</code>.</p></td></tr><tr><td><p><code>consumerEndpoint</code></p></td><td><div><div><p>Consumer endpoint of the API instance.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>providerId</code></p></td><td><div><div><p>Provider ID of the API instance.</p></div></div></td><td><p>No</p></td></tr></tbody></table>

Example request (create API instance)

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>operation</code></p></td><td><div><div><p>Operation to perform on the asset. Valid values are:</p></div><div><ul><li><p><code>create</code> to create an asset.</p></li><li><p><code>update</code> to modify an existing asset.</p></li><li><p><code>delete</code> to remove an asset.</p></li></ul></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><p><code>groupId</code></p></td><td><div><div><p>Group ID of the asset in Anypoint Exchange.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>assetId</code></p></td><td><div><div><p>The ID of the asset.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>version</code></p></td><td><div><div><p>Version of the asset, for example, <code>1.4.0</code>.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required for asset creation.</p></div></div></td></tr><tr><td><p><code>organizationId</code></p></td><td><div><div><p>The ID of the org to publish the asset to.</p></div></div></td><td><div><div><p>No</p></div><div><p>Optional for asset creation.</p></div></div></td></tr><tr><td><p><code>classifier</code></p></td><td><div><div><p>The type of asset. Valid values are:</p></div><div><ul><li><p><code>raml-fragment</code></p></li><li><p><code>raml</code></p></li><li><p><code>oas</code></p></li><li><p><code>wsdl</code></p></li><li><p><code>http-api</code></p></li><li><p><code>custom</code></p></li><li><p><code>evented-api</code></p></li><li><p><code>graphql</code></p></li><li><p><code>mule-application</code></p></li><li><p><code>mule-plugin</code></p></li></ul></div></div></td><td><div><div><p>No</p></div><div><p>Required for asset creation.</p></div></div></td></tr><tr><td><p><code>name</code></p></td><td><div><div><p>The name of the asset.</p></div></div></td><td><div><div><p>No</p></div><div><ul><li><p>Required for asset creation.</p></li><li><p>Optional for asset update.</p></li></ul></div></div></td></tr><tr><td><p><code>description</code></p></td><td><div><div><p>The description of the asset to create or update.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>assetLink</code></p></td><td><div><div><p>The URL of the asset.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required when creating wsdl or http assets.</p></div></div></td></tr><tr><td><p><code>apiVersion</code></p></td><td><div><div><p>The product version of API assets.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required when creating raml, oas, wsdl, or http assets.</p></div></div></td></tr><tr><td><p><code>main</code></p></td><td><div><div><p>The main file of the asset.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required when creating raml, raml-fragment, oas, and wsdl assets.</p></div></div></td></tr><tr><td><p><code>dependencies</code></p></td><td><div><div><p>A stringified array of dependency JSON objects, where each object consists of <code>groupId</code>, <code>assetId</code>, and <code>version</code>.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required when creating api-group assets.</p></div></div></td></tr><tr><td><p><code>originalFormatVersion</code></p></td><td><div><div><p>The version of the API spec format.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required for asset creation.</p></div></div></td></tr><tr><td><p><code>metadata</code></p></td><td><div><div><p>Stringified value of a Design Center JSON object describing the asset <code>projectId</code>, <code>branchId</code>, and <code>commitId</code>. Used for asset creation.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>keywords</code></p></td><td><div><div><p>Stringified array of string values to save as the asset’s attributes. Use to find assets by keyword. Used for asset creation.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>tags</code></p></td><td><div><div><p>Stringified array of string values to save as the asset’s tags. Used for asset creation.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>projectPath</code></p></td><td><div><div><p>The asset project file or project root directory.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required for raml, raml-fragment, oas, evented-api, wsdl, mule-plugin, and mule-application asset creation.</p></div></div></td></tr><tr><td><p><code>deleteType</code></p></td><td><div><div><p>Type of asset deletion to perform. Valid values are:</p></div><div><ul><li><p><code>soft-delete</code> indicates logical deletion.</p></li><li><p><code>hard-delete</code> indicates physical deletion.</p></li></ul></div><div><p>The default value is <code>soft-delete</code>.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>contactName</code></p></td><td><div><div><p>New contact name for the asset. Used for updating the asset.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>contactEmail</code></p></td><td><div><div><p>New contact email of the asset. Used for updating the asset.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>iconFile</code></p></td><td><div><div><p>Path to the icon file (image formats such as PNG and JPG) to add to the asset. Used for updating the asset.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>assetPropertiesFilePath</code></p></td><td><div><div><p>Path to the asset properties file. File name should be <code>pom.xml</code> or have a <code>.pom</code> extension.</p></div></div></td><td><div><div><p>No</p></div><div><p>Optional for asset creation.</p></div></div></td></tr></tbody></table>

Example request (create asset)

```json
{
  "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)

```json
{
  "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)

```json
{
  "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)

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><div><div><p>Path of the Mule project directory where the <code>pom.xml</code> file is located.</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><p><code>operation</code></p></td><td><div><div><p>Task to perform. Valid values are:</p></div><div><ul><li><p><code>define</code> to create metadata.</p></li><li><p><code>attach</code> to apply metadata to flow components.</p></li><li><p><code>update</code> to update existing metadata.</p></li></ul></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><p><code>metadata</code></p></td><td><div><div><p>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 <code>applyMetadataOn</code> parameter.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required when the operation parameter value is <code>define</code>.</p></div></div></td></tr><tr><td><p><code>dataFormat</code></p></td><td><div><div><p>The format of the metadata to process. Specify <code>JSON</code> for JSON-formatted metadata or <code>XML</code> for XML-formatted metadata.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>metadataPath</code></p></td><td><div><div><p>Path of the sample metadata or schema file. To specify if this metadata is for input or output, use the <code>applyMetadataOn</code> parameter.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required when the operation parameter value is <code>define</code>.</p></div></div></td></tr><tr><td><p><code>componentNodeDocId</code></p></td><td><div><div><p>The <code>doc:id attribute</code> value of the flow component. For example, if the node is <code>&lt;ee:transform doc:name='Transform' doc:id='hdipfo' &gt;</code>, specify <code>hdipfo</code> as the <code>componentNodeDocId</code>.</p></div></div></td><td><div><div><p>No</p></div><div><ul><li><p>Required when the operation is <code>apply</code>.</p></li><li><p>Optional when the operation is <code>define</code>.</p></li></ul></div></div></td></tr><tr><td><p><code>metadataName</code></p></td><td><div><div><p>Name of the new metadata to define based on a sample data JSON, for example, <code>customer</code> if sample data is for a customer.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required when the operation parameter value is <code>define</code>.</p></div></div></td></tr><tr><td><p><code>isSchema</code></p></td><td><div><div><p>Whether the metadata is a schema.</p></div></div></td><td><div><div><p>Yes</p></div><div><p>Required when the operation parameter value is <code>define</code>.</p></div></div></td></tr><tr><td><p><code>applyMetadataOn</code></p></td><td><div><div><p>Specifies whether the metadata is for the component’s input or output. If not specified, metadata is used for input.</p></div></div></td><td><div><div><p>No</p></div><div><ul><li><p>Required when the operation is <code>apply</code>.</p></li><li><p>Optional when the operation is <code>define</code>.</p></li></ul></div></div></td></tr><tr><td><p><code>existingMetadata</code></p></td><td><div><div><p>Name of existing metadata type to apply to the flow component node. To specify if this metadata is for input or output, use the <code>applyMetadataOn</code> parameter.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required when the operation parameter value is <code>apply</code>.</p></div></div></td></tr><tr><td><p><code>listExistingMetadata</code></p></td><td><div><div><p>Whether to list all available metadata types in the project. Use this parameter to discover existing metadata.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><p><code>updateMetadata</code></p></td><td><div><div><p>Name of existing metadata type to update.</p></div></div></td><td><div><div><p>No</p></div><div><p>Required when the operation parameter value is <code>update</code>.</p></div></div></td></tr><tr><td><p><code>toolSummary</code></p></td><td><div><div><p>Description of the tool.</p></div></div></td><td><div><div><p>No</p></div></div></td></tr></tbody></table>

Example request (define metadata)

```json
{
  "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)

```json
{
  "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)

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>environmentName</code></p></td><td><p>Name of the environment to list applications from.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>appName</code></p></td><td><p>An application to search for.</p></td><td><p>No</p></td></tr><tr><td><p><code>organizationId</code></p></td><td><p>ID of the organization to list applications from.</p></td><td><p>No</p></td></tr><tr><td><p><code>page</code></p></td><td><p>The page number of the result.</p></td><td><p>No</p></td></tr><tr><td><p><code>includeCpuMetrics</code></p></td><td><p>Set value to <code>true</code> to include CPU metrics when searching for an application.</p></td><td><p>No</p></td></tr><tr><td><p><code>includeHeapMetrics</code></p></td><td><p>Set value to <code>true</code> to include used and total heap metrics when searching for an application.</p></td><td><p>No</p></td></tr><tr><td><p><code>timeFrame</code></p></td><td><p>If <code>includeCpuMetrics</code> or <code>includeHeapMetrics</code> is true, this parameter contains the time frame for metrics.</p><p>Valid values are <code>5m</code>, <code>15m</code>, <code>30m</code>, <code>1h</code>, <code>3h</code>, <code>6h</code>, <code>12h</code>, <code>24h</code>, <code>3d</code>, <code>5d</code>, <code>7d</code>, <code>15d</code>, and <code>30d</code>.</p><p>The default value is <code>30m</code>.</p></td><td><p>No</p></td></tr></tbody></table>

Example request (basic application list)

```json
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "list_applications",
  "arguments": {
    "environmentName": "Production",
    "page": 1
  }
}
```

Example request (with metrics)

```json
{
  "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,
    "timeFrame": "1h"
  }
}
```

Example response

```json
{
  "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"
      }
    },
    {
      "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><p>Path to the project folder. The default is the current workspace. For absolute paths, use <code>file:</code> followed by three slash characters.</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "name": "list_governance_rulesets",
  "arguments": {
    "projectPath": "/Users/developer/projects/pet-store-api"
  }
}
```

Example response

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>organizationId</code></p></td><td><p>The ID of the organization where instances reside. Default is the ID of the user’s organization from the current session.</p></td><td><p>No</p></td></tr><tr><td><p><code>environmentName</code></p></td><td><p>The name of the environment where instances reside. Default is the environment for the organization specified in <code>organizationId</code>.</p></td><td><p>No</p></td></tr><tr><td><p><code>apiInstanceId</code></p></td><td><p>ID of the API instance.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>operation</code></p></td><td><p>Operation to perform on the API instance policy. Use <code>apply</code> to apply a new policy or <code>update</code> to update an existing policy configuration.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>policyId</code></p></td><td><p>ID of the policy to configure.</p></td><td><p>No</p><p>Required to update an existing policy configuration.</p></td></tr><tr><td><p><code>policyConfiguration</code></p></td><td><p>Configuration object for the policy.</p></td><td><p>No</p><p>Required to apply a new policy.</p></td></tr><tr><td><p><code>groupId</code></p></td><td><p>Group ID of the policy asset in Anypoint Exchange.</p></td><td><p>No</p><p>Required to apply a new policy.</p></td></tr><tr><td><p><code>assetId</code></p></td><td><p>Asset ID of the policy asset in Anypoint Exchange.</p></td><td><p>No</p><p>Required to apply a new policy.</p></td></tr><tr><td><p><code>assetVersion</code></p></td><td><p>Version of the policy asset in Anypoint Exchange.</p></td><td><p>No</p><p>Required to apply a new policy.</p></td></tr></tbody></table>

Example request (apply new policy)

```json
{
  "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)

```json
{
  "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

```json
{
  "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 an Omni 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](https://docs.mulesoft.com/pdk/latest/policies-pdk-prerequisites).

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>operation</code></p></td><td><p>Operation to perform on the Omni Gateway policy project. Use <code>create</code> to create a project, <code>configure</code> to set up project configuration, <code>build</code> to compile the project, <code>publish-dev</code> to publish to development environment, or <code>publish-release</code> to publish a release version.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>projectPath</code></p></td><td><p>Path to the Omni Gateway policy project directory.</p></td><td><p>No</p></td></tr><tr><td><p><code>policyName</code></p></td><td><p>Name of the policy project.</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>endpointUrl</code></p></td><td><p>URL of the endpoint.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>method</code></p></td><td><p>HTTP method to create the request to the mocking service.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>id</code></p></td><td><p>Random, agent-generated UUID number that identifies the request to the mocking service.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>headers</code></p></td><td><p>Delimited string of headers sent to the endpoint. The delimiter character is \n. For example, <code>Authorization: token\nOrigin: localhost</code>.</p></td><td><p>No</p></td></tr><tr><td><p><code>payload</code></p></td><td><p>Body content sent to the endpoint as a string. Make sure to consider the endpoint’s expected media type.</p></td><td><p>No</p></td></tr><tr><td><p><code>projectPath</code></p></td><td><p>Path to the project folder. The default is the current workspace. For absolute paths, use <code>file:</code> followed by three slash characters.</p></td><td><p>No</p></td></tr></tbody></table>

Example request (GET)

```json
{
  "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)

```json
{
  "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

```json
{
  "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"
}
```

## open\_project

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

Available only in Anypoint Code Builder.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><p>Path to the project folder. The default is the current workspace. For absolute paths, use <code>file:</code> followed by three slash characters. For example, <code>file:///Users/myUser/workspace/</code>.</p></td><td><p>No</p></td></tr><tr><td><p><code>newWindow</code></p></td><td><p>Whether the project opens in a new VS Code window (true) or not (false). The default is false.</p></td><td><p>No</p></td></tr><tr><td><p><code>addToWorkspace</code></p></td><td><p>Whether the project opens in a new folder in the workspace (true) or not (false). If true, then <code>newWindow=false</code>.</p></td><td><p>No</p></td></tr></tbody></table>

Example request (open in current window)

```json
{
  "name": "open_project",
  "arguments": {
    "projectPath": "file:///Users/developer/projects/pet-store-api",
    "newWindow": false,
    "addToWorkspace": false
  }
}
```

Example request (add to workspace)

```json
{
  "name": "open_project",
  "arguments": {
    "projectPath": "file:///Users/developer/projects/customer-api",
    "newWindow": false,
    "addToWorkspace": true
  }
}
```

Example response

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><p>Path to the agent network project to publish.</p></td><td><p>No</p></td></tr><tr><td><p><code>assetVersion</code></p></td><td><p>Semantic version for the asset (such as <code>1.0.0</code>).</p></td><td><p>Yes</p></td></tr><tr><td><p><code>groupId</code></p></td><td><p>Organization/business group ID (falls back to project configuration).</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "name": "publish_agent_network_assets",
  "arguments": {
    "projectPath": "/Users/developer/projects/my-agent-network",
    "assetVersion": "1.0.0",
    "groupId": "com.example.organization"
  }
}
```

Example response

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><p>Path to the Mule project directory to run locally.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>javaHome</code></p></td><td><p>Get JAVA_HOME from JDK from <code>\"AnypointCodeBuilder\"</code> (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 <code>java_home</code>. If multiple JDKs exist, choose the latest one that matches <code>javaSpecificationVersions</code> in <code>mule-artifacts.json</code>. If the JDK version doesn’t match any of the versions in <code>mule-artifacts.json</code>, return 'No JAVA_HOME found. Don’t retry.'.</p></td><td><p>Yes</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>searchQuery</code></p></td><td><div><div><p>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.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>assetFilters</code></p></td><td><div><div><p>Show results that match the asset type filters.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>statuses</code></p></td><td><div><div><p>Show results that match the status. Valid values are <code>deprecated</code>, <code>development</code>, and <code>published</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>organizationId</code></p></td><td><div><div><p>The ID of the organization you want to search. The default value is the ID of the user’s organization from the current session.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>sharedWithMe</code></p></td><td><div><div><p>Include shared assets in the results.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>sortCriteria</code></p></td><td><div><div><p>Sort search results.</p></div><div><p>Valid values are <code>name</code> or <code>last_modified_date</code>. Defaults to <code>last_modified_date</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>ascending</code></p></td><td><div><div><p>Sort results in ascending order.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>maxResults</code></p></td><td><div><div><p>The maximum number of assets to return in the result set. Range is between 1-10. Parameter must include at least one value.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>exchangeScope</code></p></td><td><div><div><p>Determines the scope of an asset search in Exchange. Set the appropriate scope:</p></div><div><ul><li><p>For MuleSoft provided assets: <code>exchangeScope: public</code></p></li><li><p>For private assets (default): <code>exchangeScope: private</code></p></li></ul></div></div></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>configurationUri</code></p></td><td><p>Fully qualified URI of the Mule configuration XML file that contains the connector configuration. A valid value starts with <code>file:///</code> followed by the absolute path.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>configurationName</code></p></td><td><p>Value of the name attribute of the connection configuration component in the Mule configuration XML. XPath expressions aren’t supported.</p></td><td><p>Yes</p></td></tr></tbody></table>

Example request

```json
{
  "name": "test_connection",
  "arguments": {
    "configurationUri": "file:///Users/developer/customer-integration-app/src/main/mule/global.xml",
    "configurationName": "HTTP_Listener_config"
  }
}
```

Example response

```json
{
  "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"
  }
}
```

## 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).

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectName</code></p></td><td><div><div><p>Name of the API spec project.</p></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>projectLocation</code></p></td><td><div><div><p>Directory path in which to create the project.</p></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>specLanguage</code></p></td><td><div><div><p>Specification language for the API project. Valid values are:</p></div><div><ul><li><p><code>RAML</code> for RESTful API Modeling Language</p></li><li><p><code>OAS</code> for OpenAPI specification</p></li></ul></div></div></td><td><p>Yes</p></td></tr></tbody></table>

Example request (OAS 3.0)

```json
{
  "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)

```json
{
  "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)

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><p>Directory to create the project in. Default is the current workspace.</p></td><td><p>No</p></td></tr><tr><td><p><code>projectName</code></p></td><td><p>Name for the project. Default is a generated name.</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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](https://docs.mulesoft.com/mcp-connector/latest/).

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><p>Path location of the Mule project folder.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>projectXmlPath</code></p></td><td><p>Path to the Mule project XML file.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>originalPrompt</code></p></td><td><p>The original user input without modifications. Use this for requests to create MCP servers.</p></td><td><p>Yes</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>documentation</code></p></td><td><p>Detailed description of what the function does.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>parameters</code></p></td><td><p>Any parameters applicable to the function.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>example</code></p></td><td><p>An example of how to use the function.</p></td><td><p>Yes</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>groupId</code></p></td><td><p>The group ID of the project.</p></td><td><p>No</p></td></tr><tr><td><p><code>projectName</code></p></td><td><p>The project name.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>url</code></p></td><td><p>The URL location where you want to create the new project. The default, if not specified, is <code>{USER_HOME}/dw-projects/</code>.</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "tool_name": "dataweave_create_project",
  "arguments": {
    "groupId": "com.mycompany.dataweave",
    "projectName": "customer-data-transformer",
    "url": "file:///Users/developer/dataweave-projects/"
  }
}
```

Example response

```json
{
  "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](https://docs.mulesoft.com/dataweave/latest/dataweave-language-introduction)

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>url</code></p></td><td><p>The URL of the DataWeave transformation file to create sample input for. The file must be in the format of <code>file:://path</code>. For example, <code>file:///home/mdeachaval/test.dwl</code>. By default, uses the currently open file.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>content</code></p></td><td><p>The content of the sample input.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>extension</code></p></td><td><p>The file extension for the sample content file type. For example <code>json</code> for a JSON file or <code>xml</code> for an XML file. The default value is <code>json</code>.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>name</code></p></td><td><p>The name of the input to generate, such as <code>payload</code>. The default value is <code>payload</code>.</p></td><td><p>Yes</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>url</code></p></td><td><p>The URL of the project in the format <code>file://&lt;path&gt;</code>.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>moduleUrl</code></p></td><td><p>The URL of the DataWeave module file in the format <code>file://&lt;path&gt;.dwl</code> or <code>jar://&lt;path&gt;.dwl</code> to search documentation for. Use the <code>dataweave_get_project_metadata</code> tool to get the URL of a given module.</p></td><td><p>Yes</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>url</code></p></td><td><p>The URL of the project in the format <code>file://&lt;path&gt;</code>.</p></td><td><p>Yes</p></td></tr></tbody></table>

Example request

```json
{
  "tool_name": "dataweave_get_project_metadata",
  "arguments": {
    "url": "file:///Users/developer/my-dataweave-project"
  }
}
```

Example response

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>url</code></p></td><td><p>The URL of the project to open, in the format <code>file://&lt;path&gt;</code>.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>newWindow</code></p></td><td><p>Whether to open the file in a new window (<code>true</code>) or not (<code>false</code>). The tool always prompts the user.</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "tool_name": "dataweave_open_project",
  "arguments": {
    "url": "file:///Users/developer/my-dataweave-project",
    "newWindow": false
  }
}
```

Example response

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>url</code></p></td><td><p>The URL of the file to run the preview. The file must be in the format of <code>file:://path</code>. For example, <code>file:///home/mdeachaval/test.dwl</code>. By default, uses the currently open file.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>content</code></p></td><td><p>The content of the script to execute.</p></td><td><p>Yes</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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 Omni Gateway configuration for deployment.

Prerequisites:

- Managed Omni Gateway

- A business group

- A valid `exchange.json` file in the agent network project

Available only in Anypoint Code Builder.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><p>Path to the agent network project to deploy.</p></td><td><p>No</p></td></tr><tr><td><p><code>environmentName</code></p></td><td><p>Target environment name (prompts for selection if not provided).</p></td><td><p>No</p></td></tr><tr><td><p><code>privateSpaceName</code></p></td><td><p>Private space name (prompts for selection if not provided).</p></td><td><p>No</p></td></tr><tr><td><p><code>ingressGatewayName</code></p></td><td><p>Ingress gateway name (prompts for selection if not provided).</p></td><td><p>No</p></td></tr><tr><td><p><code>egressGatewayName</code></p></td><td><p>Egress gateway name (prompts for selection if not provided).</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "name": "deploy_agent_network",
  "arguments": {
    "projectPath": "/Users/developer/projects/my-agent-network"
  }
}
```

Example response

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><p>Path to Maven project root directory.</p></td><td><p>No</p></td></tr><tr><td><p><code>appName</code></p></td><td><p>The name of the application to deploy.</p></td><td><p>No</p></td></tr><tr><td><p><code>environmentName</code></p></td><td><p>Name of the environment to deploy the app to.</p></td><td><p>No</p></td></tr><tr><td><p><code>deploymentTargetName</code></p></td><td><p>Name of the deployment target.</p></td><td><p>No</p></td></tr><tr><td><p><code>runtimeVersion</code></p></td><td><p>Runtime version to use.</p></td><td><p>No</p></td></tr><tr><td><p><code>groupId</code></p></td><td><p>Group ID of the asset in Anypoint Exchange.</p></td><td><p>No</p></td></tr><tr><td><p><code>artifactId</code></p></td><td><p>Artifact ID of the asset in Anypoint Exchange.</p></td><td><p>No</p></td></tr><tr><td><p><code>version</code></p></td><td><p>Version of the asset or application.</p></td><td><p>No</p></td></tr><tr><td><p><code>secure</code></p></td><td><p>Whether to enable enhanced security features. The default is <code>false</code>.</p></td><td><p>No</p></td></tr><tr><td><p><code>highAvailability</code></p></td><td><p>Whether to enable high availability features. The default is <code>false</code>.</p></td><td><p>No</p></td></tr><tr><td><p><code>performanceOptimization</code></p></td><td><p>Whether to enable performance optimization features. The default is <code>false</code>.</p></td><td><p>No</p></td></tr><tr><td><p><code>minimumReplicas</code></p></td><td><p>Minimum number of replicas if high availability or performance optimization is enabled. Minimum is 1.</p></td><td><p>No</p></td></tr><tr><td><p><code>organizationId</code></p></td><td><p>The ID of the organization to deploy the application to.</p></td><td><p>No</p></td></tr></tbody></table>

Example request (local project deployment)

```json
{
  "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)

```json
{
  "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

```json
{
  "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.

    See
    [Enabling or Disabling Generative AI for Anypoint Platform](https://docs.mulesoft.com/access-management/enabling-generative-ai).

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>language</code></p></td><td><div><div><p>Language of the API specification to generate. Valid values are:</p></div><div><ul><li><p><code>oas</code> for OpenAPI specifications</p></li><li><p><code>raml</code> for RAML specifications</p></li></ul></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>languageVersion</code></p></td><td><div><div><ul><li><p>If <code>language=oas</code>, valid value is <code>3.0</code>.</p></li><li><p>If <code>language=raml</code>, valid value is <code>1.0</code>.</p></li></ul></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>specSyntax</code></p></td><td><div><div><p>Syntax of the generated API spec.</p></div><div><ul><li><p>If <code>language=oas</code> or <code>oas-components</code>, valid values are <code>json</code> and <code>yaml</code>.</p></li><li><p>If <code>language=raml</code> or <code>raml-fragments</code>, valid value is <code>raml</code>.</p></li></ul></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>projectType</code></p></td><td><div><div><p>Valid value is <code>API_SPEC</code>.</p></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>naturalLanguagePrompt</code></p></td><td><div><div><p>Input to the Large Language Model (LLM).</p></div></div></td><td><p>Yes</p></td></tr></tbody></table>

Example request (OAS)

```json
{
  "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)

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><p>Path to the existing Mule project directory.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>projectXmlPath</code></p></td><td><p>Path to the existing Mule project XML file.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>originalUserPrompt</code></p></td><td><p>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.</p></td><td><p>Yes</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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\_or\_modify\_munit\_test

Generate, modify, or fix MUnit tests for Mule flows. Provide the flow XML, test scenario
description, and dependencies for accurate test generation.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectSource</code></p></td><td><div><div><p>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. Required for generating, modifying or fixing an MUnit test.</p></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>munitFileName</code></p></td><td><div><div><p>The file name of the MUnit test. Generate the file name from the source file name in the format <code>&lt;mule-configuration-file-name&gt;-test-suite.xml</code>.</p></div></div></td><td><p>Yes for generating an MUnit test</p></td></tr><tr><td><p><code>prompt</code></p></td><td><div><div><p>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."</p></div></div></td><td><p>Yes for generating, modifying or fixing an MUnit test</p></td></tr><tr><td><p><code>minRuntimeVersion</code></p></td><td><div><div><p>The minimum runtime version required for the flow.</p></div></div></td><td><p>Yes for generating an MUnit test</p></td></tr><tr><td><p><code>dependencies</code></p></td><td><div><div><p>A JSON object containing flow dependencies referenced by the main flow. The object must include <code>flowDependencies</code>: An array of flow dependency objects that contain the <code>source</code> (the source of the dependency) and`name` (the name of the dependency) properties.</p></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>existingMunit</code></p></td><td><div><div><p>The XML source of the existing MUnit test case that needs to be modified, including the <code>&lt;munit:test&gt;</code> element and all nested components, such as mocks, variables, and assertions.</p></div></div></td><td><p>Yes for modifying or fixing an MUnit test.</p></td></tr></tbody></table>

Example request (generate)

```json
{
  "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 (generate)

```json
{
  "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"
    ]
  }
}
```

Example request (modify)

```json
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "modify_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 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 (modify)

```json
{
  "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"
    ]
  }
}
```

## get\_flex\_gateway\_policy\_example

Get an Omni 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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>feature</code></p></td><td><div><div><p>The type of policy feature to generate an example for. Valid values are:</p></div><div><ul><li><p><code>authentication</code> to propagate authentication information to other policies.</p></li><li><p><code>body_manipulation</code> to read or update request/response body.</p></li><li><p><code>body_stream</code> to read request/response body by chunks.</p></li><li><p><code>cache</code> to use the cache library to share data across workers.</p></li><li><p><code>contracts</code> to authenticate and authorize against the management plane.</p></li><li><p><code>control_flow</code> to stop the request flow and generate a custom response.</p></li><li><p><code>cors</code> to use the Cross-Origin Resource Sharing library.</p></li><li><p><code>dataweave</code> to define and evaluate custom DataWeave expressions.</p></li><li><p><code>grpc</code> to make a gRPC call to an external service.</p></li><li><p><code>header_manipulation</code> to perform CRUD operations for request/response headers.</p></li><li><p><code>http_call</code> to make an HTTP call to an external service.</p></li><li><p><code>ip_filter</code> to allow or block requests based on IP addresses and CIDR ranges.</p></li><li><p><code>jwt</code> to parse and validate JSON Web Tokens.</p></li><li><p><code>jwt_generate</code> to generate JSON Web Tokens.</p></li><li><p><code>json_validator</code> to validate JSON payloads.</p></li><li><p><code>lock</code> to synchronize workers.</p></li><li><p><code>logger</code> to print custom messages.</p></li><li><p><code>metadata</code> to access metadata of the policy, API, and environment.</p></li><li><p><code>oauth2_token_introspection</code> to validate OAuth2 tokens.</p></li><li><p><code>outbound</code> to define an outbound policy.</p></li><li><p><code>policy_violation</code> to mark requests as violations in monitoring traffic.</p></li><li><p><code>rate_limiting</code> to allow or block requests based on rate limits.</p></li><li><p><code>request_data</code> to share data between requests and responses.</p></li><li><p><code>spike_control</code> to limit requests by queuing or rejecting traffic that exceeds a sliding-window rate limit.</p></li><li><p><code>stop_iteration</code> to enable processing of headers and body in the same request/response state.</p></li><li><p><code>timer</code> to perform sleep operations.</p></li><li><p><code>unit_testing</code> to generate unit tests for your custom policy.</p></li><li><p><code>worker_variable</code> to share data across requests of a single worker.</p></li><li><p><code>xml_validator</code> to validate XML payloads.</p></li></ul></div></div></td><td><p>Yes</p></td></tr></tbody></table>

Example request

```json
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "get_flex_gateway_policy_example",
  "arguments": {
    "feature": "header_manipulation"
  }
}
```

Example response

```json
{
  "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 Omni 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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>entityName</code></p></td><td><div><div><p>Name of the application or API.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>entityType</code></p></td><td><div><div><p>Type of entity to get insights for. Use <code>application</code> for Mule applications or <code>api</code> for APIs.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>includeFlows</code></p></td><td><div><div><p>Whether to include app usage trends for flows. The default value is <code>false</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>includeMessages</code></p></td><td><div><div><p>Whether to include app usage trends for messages. The default value is <code>false</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>includeDataThroughput</code></p></td><td><div><div><p>Whether to include app usage trends for data throughput. The default value is <code>false</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>includeErrorCount</code></p></td><td><div><div><p>Whether to include error counts from apps and APIs. The default value is <code>false</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>includeCallVolume</code></p></td><td><div><div><p>Whether to include call volume from apps and APIs. The default value is <code>false</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>includeLatency</code></p></td><td><div><div><p>Whether to include P99 latency in the response time. The default value is <code>false</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>latencyPercentile</code></p></td><td><div><div><p>If <code>includeLatency=true</code>, this parameter specifies which percentile to use for latency measurements. Valid values are:</p></div><div><ul><li><p><code>P99</code> for 99th percentile</p></li><li><p><code>P95</code> for 95th percentile</p></li><li><p><code>P90</code> for 90th percentile</p></li><li><p><code>P75</code> for 75th percentile</p></li></ul></div><div><p>The default value is <code>P99</code>.</p></div></div></td><td><p>No</p></td></tr></tbody></table>

Example request (organization overview)

```json
{
  "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)

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>includeReuseMetrics</code></p></td><td><p>Whether the output includes reuse metrics for applications. Default is false.</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
  "tool_name": "get_reuse_metrics",
  "arguments": {
    "includeReuseMetrics": true
  }
}
```

Example response

```json
{
  "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

```json
{
  "name": "get_topics_agent_actions_metadata_instructions",
  "arguments": {}
}
```

Example response

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>mode</code></p></td><td><p>Determines the operation type. To implement API specs in a local workspace, use <code>local_scaffolding</code> mode. For APIs published to Anypoint Exchange, use <code>exchange_api_scaffolding</code>.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>projectName</code></p></td><td><p>The name for the integration project. Also used as the project folder name.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>projectPath</code></p></td><td><p>[<code>local_scaffolding</code> mode] The absolute path to the local API project to scaffold. The API project must contain a valid exchange.json and classifier.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>projectLocation</code></p></td><td><p>The path where the project folder is located. The default is the current workspace.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>groupId</code></p></td><td><p>[<code>exchange_api_scaffolding</code> mode] The group ID of the API specification in Anypoint Exchange.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>assetId</code></p></td><td><p>[<code>exchange_api_scaffolding</code> mode] The asset ID of the API specification in Anypoint Exchange.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>version</code></p></td><td><p>[<code>exchange_api_scaffolding</code> mode] The version of the API specification, for example '1.4.0'.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>classifier</code></p></td><td><p>[<code>exchange_api_scaffolding</code> mode] The classifier of the API specification. Fetched from Anypoint Exchange if not provided.</p></td><td><p>No</p></td></tr><tr><td><p><code>type</code></p></td><td><p>[<code>exchange_api_scaffolding</code> mode] The type or packaging of the API specification. Fetched from Anypoint Exchange if not provided.</p></td><td><p>No</p></td></tr><tr><td><p><code>main</code></p></td><td><p>[<code>exchange_api_scaffolding</code> mode] The main file of the API specification. Fetched from Anypoint Exchange if not provided.</p></td><td><p>No</p></td></tr><tr><td><p><code>runtimeVersion</code></p></td><td><p>The runtime version to use. Uses the workspace configuration or the latest version available if not specified.</p></td><td><p>No</p></td></tr><tr><td><p><code>jdkVersion</code></p></td><td><p>The JDK version to use. Uses the workspace configuration or the latest available if not specified.</p></td><td><p>No</p></td></tr><tr><td><p><code>mavenGroupId</code></p></td><td><p>The Maven group ID for the project. Defaults to the group ID of the API specification or workspace setting.</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>organizationId</code></p></td><td><p>ID of the organization where instances reside. Default is the ID of the default organization.</p></td><td><p>No</p></td></tr><tr><td><p><code>environmentName</code></p></td><td><p>Name of the environment where instances reside. Default is the name of the default environment for the organization specified in <code>organizationId</code>.</p></td><td><p>No</p></td></tr><tr><td><p><code>apiInstanceId</code></p></td><td><p>Instance ID of the API.</p></td><td><p>No</p><p>Required if <code>includeAvailablePolicies=true</code>.</p></td></tr><tr><td><p><code>apiInstanceLabel</code></p></td><td><p>Label or name of the API instance.</p></td><td><p>No</p></td></tr><tr><td><p><code>page</code></p></td><td><p>Page number of the results. Each page contains information for up to 10 instances.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>includeAppliedPolicies</code></p></td><td><p>Whether to include applied policies in results.</p></td><td><p>No</p></td></tr><tr><td><p><code>includeAvailablePolicies</code></p></td><td><p>Whether to include available policies in results. Requires <code>apiInstanceId</code>.</p></td><td><p>No</p></td></tr></tbody></table>

Example request (list all instances)

```json
{
  "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)

```json
{
  "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

```json
{
  "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\_add\_pagination

Add pagination support to a specific CCM operation. Takes the operation file path and pagination
configuration parameters and creates a paginated operation module.

Available only in Connector Builder.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>operationFilePath</code></p></td><td><div><div><p>Path (URI) to an operation file inside the CCM operations directory.</p></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>type</code></p></td><td><div><div><p>Pagination strategy to apply. Valid values are:</p></div><div><ul><li><p><code>offset</code></p></li><li><p><code>cursor</code></p></li><li><p><code>page</code></p></li><li><p><code>timestamp</code></p></li><li><p><code>custom</code></p></li></ul></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>itemsField</code></p></td><td><div><div><p>Path to the array of items in the response, for example, <code>data.items</code> or <code>results</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>offsetParam</code></p></td><td><div><div><p>Name of the offset parameter, for example, <code>offset</code> or <code>skip</code>.</p></div></div></td><td><p>Required when <code>type='offset'</code>.</p></td></tr><tr><td><p><code>initialOffsetValue</code></p></td><td><div><div><p>Starting offset value (typically <code>0</code>).</p></div></div></td><td><p>Required when <code>type='offset'</code>.</p></td></tr><tr><td><p><code>pageNumberParam</code></p></td><td><div><div><p>Name of the page number parameter, for example, <code>page</code> or <code>pageNumber</code>.</p></div></div></td><td><p>Required when <code>type='page'</code>.</p></td></tr><tr><td><p><code>initialPageNumber</code></p></td><td><div><div><p>Starting page number (typically <code>0</code> or <code>1</code>).</p></div></div></td><td><p>Required when <code>type='page'</code>.</p></td></tr><tr><td><p><code>timestampParam</code></p></td><td><div><div><p>Name of the timestamp parameter, for example, <code>since</code> or <code>after</code>.</p></div></div></td><td><p>Required when <code>type='timestamp'</code>.</p></td></tr><tr><td><p><code>cursorParam</code></p></td><td><div><div><p>Name of the cursor parameter, for example, <code>cursor</code> or <code>nextToken</code>.</p></div></div></td><td><p>Required when <code>type='cursor'</code>.</p></td></tr><tr><td><p><code>referenceType</code></p></td><td><div><div><p>Type of reference used for cursor pagination. Valid values are:</p></div><div><ul><li><p><code>marker</code> for a simple marker or token value</p></li><li><p><code>uri</code> for a URI containing the next page reference</p></li></ul></div></div></td><td><p>Required when <code>type='cursor'</code>.</p></td></tr><tr><td><p><code>referenceExpression</code></p></td><td><div><div><p>Path expression to extract the next cursor value from the response, for example, <code>pagination.nextCursor</code>.</p></div></div></td><td><p>Required when <code>type='cursor'</code>.</p></td></tr><tr><td><p><code>projectRootPath</code></p></td><td><div><div><p>Absolute path to the connector project directory. Defaults to the workspace root folder.</p></div></div></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "name": "uc_add_pagination",
  "arguments": {
    "operationFilePath": "/Users/you/workspace/stripe-connector/operations/list-customers.yaml",
    "type": "cursor",
    "cursorParam": "starting_after",
    "referenceType": "marker",
    "referenceExpression": "data[-1].id",
    "itemsField": "data"
  }
}
```

Example response

```json
{
  "success": true,
  "message": "Pagination added to operation."
}
```

## uc\_connector\_lifecycle

Manage connector lifecycle operations. Use `type='build'` to build the connector project using the
extension’s bundled Maven (`mvn install`). Use `type='publish'` to publish the connector to Anypoint
Exchange (`mvn deploy`). For publish, the tool automatically determines execution mode: granular
mode if all required configuration is available (executes publish directly), or workflow mode if
`organizationId` or `repositoryId` is missing (returns a workflow plan to collect configuration).

Available only in Connector Builder.

> [!NOTE] This tool was previously named `uc_publish_connector`. The renamed tool also supports the
> `build` action.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>type</code></p></td><td><div><div><p>Lifecycle action to perform. Valid values are:</p></div><div><ul><li><p><code>build</code> to compile and package the connector project</p></li><li><p><code>publish</code> to deploy the connector to Anypoint Exchange</p></li></ul></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>cleanBeforeBuild</code></p></td><td><div><div><p>Whether to run <code>clean</code> before <code>install</code>. Used when <code>type='build'</code>. Defaults to the corresponding VS Code setting.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>workflowCustomization</code></p></td><td><div><div><p>Specific workflow customizations, preferences, or requirements for the publish process. Used when <code>type='publish'</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>organizationId</code></p></td><td><div><div><p>Anypoint Exchange organization ID. If not provided, the tool checks the POM file. If missing there too, workflow mode is triggered. Used when <code>type='publish'</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>repositoryId</code></p></td><td><div><div><p>Private Exchange repository ID. Same fallback behavior as <code>organizationId</code>. Used when <code>type='publish'</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>profiles</code></p></td><td><div><div><p>Maven profiles to activate for deployment. Defaults to <code>['private-exchange-deploy']</code>. Used when <code>type='publish'</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>projectRootPath</code></p></td><td><div><div><p>Absolute path to the connector project directory. Defaults to the workspace root folder.</p></div></div></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "name": "uc_connector_lifecycle",
  "arguments": {
    "type": "publish",
    "organizationId": "abc123",
    "repositoryId": "xyz789"
  }
}
```

Example response

```json
{
  "success": true,
  "message": "Connector published to Anypoint Exchange."
}
```

## 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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>workflowCustomization</code></p></td><td><div><div><p>Any specific workflow customizations, preferences, or requirements for the connector-creation process.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>flow</code></p></td><td><div><div><p>Flow selection. Valid values are:</p></div><div><ul><li><p><code>generate-spec</code> to generate an API spec from documentation</p></li><li><p><code>existing-spec</code> if the user has an existing API spec file</p></li><li><p><code>auto-detect</code> to determine automatically</p></li></ul></div></div></td><td><p>No</p></td></tr><tr><td><p><code>existingApiSpec</code></p></td><td><div><div><p>Absolute path to existing API spec file (OpenAPI/Swagger YAML or JSON) if using <code>existing-spec</code> flow.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>mode</code></p></td><td><div><div><p>Execution mode. Valid values are:</p></div><div><ul><li><p><code>standard</code> (default) runs interactively with user confirmation steps.</p></li><li><p><code>connectorless</code> runs autonomously and only pauses to collect credentials.</p></li></ul></div></div></td><td><p>No</p></td></tr><tr><td><p><code>platform</code></p></td><td><div><div><p>Name of the SaaS platform, for example, <code>Stripe</code> or <code>ServiceNow</code>. Pre-populates the workflow when provided.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>useCases</code></p></td><td><div><div><p>List of integration use cases, for example, <code>Sync customer data</code>. Pre-populates the workflow when provided.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>documentation</code></p></td><td><div><div><p>List of API documentation URLs. Pre-populates the workflow when provided.</p></div></div></td><td><p>No</p></td></tr></tbody></table>

Example request (generate spec flow)

```json
{
  "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)

```json
{
  "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

```json
{
  "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_manage_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_manage_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_manage_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"
  ]
}
```

## uc\_generate\_connector

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

Available only in Connector Builder.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>apiSpec</code></p></td><td><div><div><p>Absolute path to the API spec file (OpenAPI/Swagger YAML or JSON).</p></div></div></td><td><p>No</p><p>Required for <code>ccm</code> phase.</p></td></tr><tr><td><p><code>projectName</code></p></td><td><div><div><p>Name for the connector project.</p></div></div></td><td><p>No</p><p>Required for <code>ccm</code> phase.</p></td></tr><tr><td><p><code>description</code></p></td><td><div><div><p>Description for the connector project.</p></div></div></td><td><p>No</p><p>Required for <code>ccm</code> phase.</p></td></tr><tr><td><p><code>phases</code></p></td><td><div><div><p>Array of phases to execute - any combination of <code>ccm</code>, <code>anypoint</code>, and <code>flow</code>. Phases execute in order. Valid values are:</p></div><div><ul><li><p><code>ccm</code> for Canonical Connectivity Model</p></li><li><p><code>anypoint</code> for Anypoint Connector module</p></li><li><p><code>flow</code> for Flow Connector module</p></li></ul></div></div></td><td><p>No</p></td></tr><tr><td><p><code>projectRootPath</code></p></td><td><div><div><p>Absolute path to the directory where the connector project should be created (for the <code>ccm</code> phase) or found (for the <code>anypoint</code> or <code>flow</code> phases). Defaults to the workspace root folder.</p></div></div></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "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", "anypoint", "flow"]
  }
}
```

Example response

```json
{
  "success": true,
  "message": "Connector generated successfully.",
  "projectPath": "/Users/you/workspace/stripe-connector",
  "phasesExecuted": ["ccm", "anypoint", "flow"]
}
```

## uc\_generate\_tests

Generate tests for connector modules. Each requested module is configured to use either a mock
connection (no auth) or a real connection (requires a `profileId`). At least one module must be
included. Always call `uc_get_test_generation_info` first to determine which modules are available
and whether tests already exist.

Available only in Connector Builder.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>modulesConfig</code></p></td><td><div><div><p>Array of modules to test. Skipped modules are omitted from this array. At least one module is required.</p></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>modulesConfig[].moduleType</code></p></td><td><div><div><p>Module type to test. Valid values are:</p></div><div><ul><li><p><code>CCM</code> for the connectivity model</p></li><li><p><code>ACM</code> for the Anypoint Connector module</p></li><li><p><code>FCM</code> for the Flow Connector module</p></li></ul></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>modulesConfig[].useMock</code></p></td><td><div><div><p>Whether to use a mock connection. Set to <code>true</code> for a mock connection (no auth required) or <code>false</code> for a real backend connection (requires <code>profileId</code>).</p></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>profileId</code></p></td><td><div><div><p>Connection profile ID returned by <code>uc_list_connection_profiles</code>.</p></div></div></td><td><p>Required when any module has <code>useMock=false</code>.</p></td></tr><tr><td><p><code>forceOverwrite</code></p></td><td><div><div><p>Whether to overwrite existing test files. Set to <code>true</code> only after the user explicitly confirms overwriting. Defaults to <code>false</code>.</p></div></div></td><td><p>Required when existing tests are present.</p></td></tr></tbody></table>

Example request

```json
{
  "name": "uc_generate_tests",
  "arguments": {
    "modulesConfig": [
      { "moduleType": "CCM", "useMock": true },
      { "moduleType": "ACM", "useMock": false }
    ],
    "profileId": "dev-stripe",
    "forceOverwrite": false
  }
}
```

Example response

```json
{
  "success": true,
  "message": "Tests generated for CCM and ACM modules."
}
```

## uc\_get\_test\_generation\_info

Get information before generating tests. Returns the list of available connector modules (CCM, ACM,
FCM) and reports whether tests already exist for each. Always call this tool before
`uc_generate_tests` so you can determine which modules to test and whether existing test files would
be overwritten.

Available only in Connector Builder.

This tool takes no parameters.

Example request

```json
{
  "name": "uc_get_test_generation_info",
  "arguments": {}
}
```

Example response

```json
{
  "availableModules": ["CCM", "ACM", "FCM"],
  "testsExist": false
}
```

## uc\_list\_connection\_profiles

List all available connection profiles with their IDs, names, authentication types, and
descriptions. Use this tool to discover which profiles are available for executing operations or
generating tests against a real backend. The profile ID returned by this tool is required for the
`execute` type in `uc_manage_operations` and for real-connection test generation in
`uc_generate_tests`.

Available only in Connector Builder.

This tool takes no parameters.

Example request

```json
{
  "name": "uc_list_connection_profiles",
  "arguments": {}
}
```

Example response

```json
{
  "profiles": [
    {
      "id": "dev-stripe",
      "name": "Stripe Developer",
      "authenticationType": "BEARER",
      "description": "Stripe API developer credentials"
    }
  ]
}
```

## uc\_manage\_api\_spec

Manage API spec operations. Use `type='generate'` (default) to perform API research and produce both
an `api-reference.md` artifact and a complete OpenAPI 3.0 YAML spec. Use `type='research'` to
perform API research only, producing a comprehensive `api-reference.md` with entity dependency
graphs, CRUD endpoint catalogs, and field-level detail. Use `type='validate'` to validate an
existing OpenAPI spec against a live API by executing real HTTP requests, comparing responses
against expected schemas, auto-fixing mismatches, and generating a validation report. If no
parameters are used, the agent prompts for input.

Available only in Connector Builder.

> [!NOTE] This tool was previously named `uc_generate_api_spec`. The renamed tool also supports the
> `research` and `validate` modes.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>type</code></p></td><td><div><div><p>Type of operation. Valid values are:</p></div><div><ul><li><p><code>generate</code> (default): Performs API research and generates an OpenAPI YAML spec.</p></li><li><p><code>research</code>: Performs API research only and produces an <code>api-reference.md</code> artifact.</p></li><li><p><code>validate</code>: Validates an OpenAPI spec against a live API and generates a validation report.</p></li></ul></div></div></td><td><p>No</p></td></tr><tr><td><p><code>platform</code></p></td><td><div><div><p>Name of the SaaS platform or service, for example, <code>Salesforce</code>, <code>ServiceNow</code>, <code>PayPal</code>, or <code>Stripe</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>useCases</code></p></td><td><div><div><p>List of integration use cases, ordered by priority. Each use case describes a specific integration scenario, for example, <code>Sync customer data</code> or <code>Process invoices</code>. If specified, a minimum of one is required.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>documentation</code></p></td><td><div><div><p>List of official API documentation URLs. Must be valid URLs starting with <code>http://</code> or <code>https://</code>, for example, <code>https://developers.stripe.com/api</code>. If specified, a minimum of one is required.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>additionalRequirements</code></p></td><td><div><div><p>Any additional requirements, constraints, or preferences for the API spec, for example, specific authentication methods, rate limiting considerations, and version preferences.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>mode</code></p></td><td><div><div><p>Execution mode. Valid values are:</p></div><div><ul><li><p><code>standard</code> (default): Runs interactively.</p></li><li><p><code>connectorless</code>: Runs autonomously with minimal user interaction.</p></li></ul></div></div></td><td><p>No</p></td></tr><tr><td><p><code>specPath</code></p></td><td><div><div><p>Path to the OpenAPI YAML spec file to validate. Used when <code>type='validate'</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>apiReferencePath</code></p></td><td><div><div><p>Path to the <code>api-reference.md</code> file containing entity details, dependency graphs, and request/response schemas. Used when <code>type='validate'</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>baseUrl</code></p></td><td><div><div><p>API base URL override. If not provided, extracted from the OpenAPI spec or <code>api-reference.md</code>. Used when <code>type='validate'</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>authHeader</code></p></td><td><div><div><p>Authorization header value, for example, <code>Bearer &lt;token&gt;</code>. If not provided, the tool prompts for credentials. Used when <code>type='validate'</code>.</p></div></div></td><td><p>No</p></td></tr><tr><td><p><code>operationFilter</code></p></td><td><div><div><p>List of specific operation IDs to validate. If empty, validates all operations. Used when <code>type='validate'</code>.</p></div></div></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "name": "uc_manage_api_spec",
  "arguments": {
    "type": "generate",
    "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."
  }
}
```

Example response

```json
{
  "success": true,
  "message": "Generated api-reference.md and OpenAPI 3.0 spec from documentation and use cases.",
  "platform": "Stripe",
  "apiReferencePath": "/Users/you/workspace/stripe-spec/api-reference.md",
  "openApiYamlPath": "/Users/you/workspace/stripe-spec/openapi.yaml"
}
```

## uc\_manage\_operations

Manage connector operations. Use `type='list'` to enumerate available operations, `type='get'` to
retrieve one operation’s input and output schemas, or `type='execute'` to run an operation against a
connection profile. To execute an operation, first call `uc_list_connection_profiles` to retrieve a
profile ID.

Available only in Connector Builder.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>type</code></p></td><td><div><div><p>Action to perform. Valid values are:</p></div><div><ul><li><p><code>list</code> to list all operations</p></li><li><p><code>get</code> to get details for one operation</p></li><li><p><code>execute</code> to run an operation with a connection profile</p></li></ul></div></div></td><td><p>Yes</p></td></tr><tr><td><p><code>operationName</code></p></td><td><div><div><p>Operation name or ID.</p></div></div></td><td><p>Required when <code>type='get'</code> or <code>type='execute'</code>.</p></td></tr><tr><td><p><code>profileId</code></p></td><td><div><div><p>Connection profile ID returned by <code>uc_list_connection_profiles</code>.</p></div></div></td><td><p>Required when <code>type='execute'</code>.</p></td></tr><tr><td><p><code>input</code></p></td><td><div><div><p>Operation input parameters as a JSON object. Use <code>type='get'</code> first to discover the expected schema.</p></div></div></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "name": "uc_manage_operations",
  "arguments": {
    "type": "execute",
    "operationName": "getCustomer",
    "profileId": "dev-stripe",
    "input": { "id": "cus_123" }
  }
}
```

Example response

```json
{
  "success": true,
  "response": {
    "id": "cus_123",
    "name": "Acme Corp",
    "email": "billing@acme.example"
  }
}
```

## update\_mule\_application

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

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>applicationId</code></p></td><td><p>The ID of the application to update with the latest Mule runtime patch release.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>environmentId</code></p></td><td><p>The ID of the environment where the application is deployed.</p></td><td><p>Yes</p></td></tr><tr><td><p><code>organizationId</code></p></td><td><p>The ID of the organization where the application is deployed.</p></td><td><p>No</p></td></tr><tr><td><p><code>runtimeVersion</code></p></td><td><p>Mule runtime version to use. For example, <code>4.9.4:2e-java17</code>.</p></td><td><p>No</p></td></tr><tr><td><p><code>hasPersistentObjectStore</code></p></td><td><p>Whether to enable persistent object store. The default is false.</p></td><td><p>No</p></td></tr><tr><td><p><code>replicaSize</code></p></td><td><p>Replica size for CloudHub 2.0 applications. Express size in vCores or instance type size.</p></td><td><p>No</p></td></tr><tr><td><p><code>cpuReserved</code></p></td><td><p>Reserved vCPUs for the application. For example, 1.</p></td><td><p>No</p></td></tr><tr><td><p><code>cpuLimit</code></p></td><td><p>Maximum vCPUs for the application. For example, 2.</p></td><td><p>No</p></td></tr><tr><td><p><code>memory</code></p></td><td><p>Memory allocation for the allocation in GB. For example, 1.</p></td><td><p>No</p></td></tr><tr><td><p><code>replicas</code></p></td><td><p>Number of replicas.</p></td><td><p>No</p></td></tr><tr><td><p><code>minReplicas</code></p></td><td><p>If <code>hasHighAvailability=true</code> or <code>hasPerformanceOptimization=true</code>, this value is the minimum number of replicas.</p></td><td><p>No</p></td></tr><tr><td><p><code>maxReplicas</code></p></td><td><p>If <code>hasHighAvailability=true</code> or <code>hasPerformanceOptimization=true</code>, this value is the maximum number of replicas.</p></td><td><p>No</p></td></tr><tr><td><p><code>hasAutoscaling</code></p></td><td><p>Whether to enable autoscaling. The default is false.</p></td><td><p>No</p></td></tr><tr><td><p><code>hasTracing</code></p></td><td><p>Whether to enable application tracing. The default is false.</p></td><td><p>No</p></td></tr><tr><td><p><code>enforceDeployingReplicasAcrossNodes</code></p></td><td><p>Whether to enforce deploying replicas across nodes (Runtime Fabric only). The default is false.</p></td><td><p>No</p></td></tr><tr><td><p><code>deploymentModel</code></p></td><td><p>The deployment strategy for application updates. Use <code>rolling</code> for zero-downtime rolling updates or <code>recreate</code> to stop and restart all instances.</p></td><td><p>No</p></td></tr><tr><td><p><code>hasClustering</code></p></td><td><p>Whether to enable clustering for the application. The default is false.</p></td><td><p>No</p></td></tr><tr><td><p><code>stopApplication</code></p></td><td><p>Whether to stop the application. The default is false.</p></td><td><p>No</p></td></tr><tr><td><p><code>startApplication</code></p></td><td><p>Whether to start the application. The default is false.</p></td><td><p>No</p></td></tr><tr><td><p><code>hasHighAvailability</code></p></td><td><p>Whether to enable high availability for the application. The default is false.</p></td><td><p>No</p></td></tr><tr><td><p><code>hasPerformanceOptimization</code></p></td><td><p>Whether to enable performance optimization. The default is false.</p></td><td><p>No</p></td></tr><tr><td><p><code>isSecure</code></p></td><td><p>Whether to enable advanced security features. The default is false.</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><p>Path where the project folder is located. The default is the current workspace. For absolute paths, use <code>file:</code> followed by three slash characters.</p></td><td><p>No</p></td></tr><tr><td><p><code>rules</code></p></td><td><p>Array of API rules to validate. If empty, the tool validates all rulesets in <code>projectPath</code>.</p></td><td><p>No</p></td></tr><tr><td><p><code>syncCentralizedRulesets</code></p></td><td><p>Whether the tool syncs centralized rulesets before validating the API specification. The default value is true.</p></td><td><p>No</p></td></tr></tbody></table>

Example request (validate all rulesets)

```json
{
  "name": "validate_api_against_ruleset",
  "arguments": {
    "projectPath": "/Users/developer/projects/pet-store-api",
    "rules": [],
    "syncCentralizedRulesets": true
  }
}
```

Example request (validate specific rules)

```json
{
  "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

```json
{
  "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.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><p><code>projectPath</code></p></td><td><p>Path where the project folder is located. The default is the current workspace. For absolute paths, use <code>file:</code> followed by three slash characters, for example, <code>file:///Users/myUser/workspace/</code>.</p></td><td><p>No</p></td></tr></tbody></table>

Example request

```json
{
  "name": "validate_project",
  "arguments": {
    "projectPath": "/Users/developer/projects/pet-store-api"
  }
}
```

Example response

```json
{
  "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"
}
```

## See Also

- [Using MuleSoft DX MCP Server](https://docs.mulesoft.com/mulesoft-mcp-server/using-mulesoft-mcp-server)
