-
Exchange: Exchange Administrator
-
Exchange: Exchange Contributor
-
Exchange: Exchange Creator
MuleSoft MCP Server Tool Reference
MuleSoft MCP Server provides tools for developing agent networks, building applications, creating connectors, managing deployments, governing APIs, and more. Each tool accepts specific parameters to automate tasks across the Anypoint Platform. Use these tools to accelerate development workflows, streamline governance, and gain operational insights into your integrations.
| Some MuleSoft MCP Server tools are available only in the Anypoint Code Builder IDE or Connector Builder. |
See Create a Connected App for information about which tools require specific permission scopes.
Command Summary
| Category | Tool | Anypoint Code Builder Only | Connector Builder Only | Required Permission Scopes |
|---|---|---|---|---|
Agent Network Development |
Yes |
No |
None |
|
Yes |
No |
None |
||
Yes |
No |
None |
||
Yes |
No |
None |
||
Application Development |
No |
No |
||
Yes |
No |
None |
||
No |
No |
None |
||
No |
No |
Anypoint Code Builder: Mule Developer Generative AI User |
||
No |
No |
None |
||
No |
No |
Anypoint Code Builder: Mule Developer Generative AI User |
||
No |
No |
Anypoint Code Builder: Mule Developer Generative AI User |
||
Yes |
No |
Anypoint Code Builder: Mule Developer Generative AI User |
||
Yes |
No |
None |
||
Yes |
No |
Exchange: Exchange Viewer |
||
Yes |
No |
None |
||
Yes |
No |
Anypoint Code Builder: Mule Developer Generative AI User |
||
Yes |
No |
None |
||
No |
No |
None |
||
No |
No |
Exchange: Exchange Viewer |
||
Yes |
No |
None |
||
Yes |
No |
None |
||
Connector Development |
No |
Yes |
None |
|
No |
Yes |
None |
||
No |
Yes |
None |
||
DataWeave Development |
No |
No |
None |
|
No |
No |
None |
||
No |
No |
None |
||
No |
No |
None |
||
No |
No |
None |
||
No |
No |
None |
||
No |
No |
None |
||
Application Management |
No |
No |
API Manager: Manage API Configuration |
|
No |
No |
|
||
No |
No |
API Manager: View APIs Configuration |
||
No |
No |
|
||
No |
No |
|
||
Governance |
Yes |
No |
None |
|
Yes |
No |
None |
||
Yes |
No |
None |
||
Policy Management |
No |
No |
None |
|
No |
No |
API Manager: Manage Policies |
||
No |
No |
None |
||
Usage and Insights |
No |
No |
|
|
No |
No |
|
add_governance_ruleset
Add a governance ruleset from Anypoint Exchange to your project. Use the search_asset tool to find a ruleset that matches an assetId, groupId, and version from user-provided criteria. The search_asset tool uses searchQuery='user' criteria and assetFilters=ruleset to return a ruleset meeting those criteria. Then, this tool adds the ruleset as a dependency to your project.
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
The ID of the asset. |
Yes |
|
Group ID of the asset in Anypoint Exchange. |
Yes |
|
Version of the asset, for example, |
Yes |
{
"name": "add_governance_ruleset",
"arguments": {
"assetId": "api-governance-ruleset",
"groupId": "com.mulesoft.governance",
"version": "1.4.0"
}
}
{
"success": true,
"assetId": "api-governance-ruleset",
"groupId": "com.mulesoft.governance",
"version": "1.4.0",
"dependencyAdded": true,
"projectPath": "/Users/developer/projects/pet-store-api",
"message": "Governance ruleset added successfully to project"
}
configure_agent_network_yaml
Modifies an agent network project YAML file. The tool can replace placeholder YAML created from a template with values generated from user prompts and guided setup (mode='configure'). Or, the tool can make minor changes to a preconfigured agent network YAML file (mode='edit'). The LLM determines the appropriate mode value from user prompts and guided setup.
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
The operation to perform on the agent network project YAML. Valid values are For example, use |
Yes |
|
Prompt from the user containing instructions to the agent. |
Yes |
{
"name": "configure_agent_network_yaml",
"arguments": {
"prompt": "configure this agent network with a new agent called 'api-manager'",
"mode": "configure"
}
}
{
"name": "configure_agent_network_yaml",
"arguments": {
"prompt": "remove the connection between agent1 and agent2",
"mode": "edit"
}
}
{
"instructions": [
"1. Open the agent-network.yaml file in your project",
"2. Locate the 'agents' section",
"3. Add the following agent configuration:",
" - name: api-manager",
" type: llm",
" provider: openai",
" model: gpt-4",
"4. Save the file",
"5. Validate the YAML syntax"
],
"mode": "configure",
"yamlSnippet": {
"agents": [
{
"name": "api-manager",
"type": "llm",
"provider": "openai",
"model": "gpt-4"
}
]
}
}
create_agent_network_project
Create and scaffold an agent network project with a name and location you specify.
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Unique name of the project, also used as the name of the agent network project file. |
Yes |
|
Parent location of the project. The default is the parent folder of the current workspace. The project resides in a subfolder of |
Yes |
|
Description of the project. |
No |
|
Organization or business group ID of the project. |
No |
{
"name": "create_agent_network_project",
"arguments": {
"projectName": "my-agent-network",
"projectPath": "/Users/developer/projects",
"projectDescription": "A sample agent network for API management"
}
}
{
"success": true,
"projectPath": "/Users/developer/projects/my-agent-network",
"filesCreated": [
"agent-network.yaml",
"exchange.json",
"README.md"
],
"message": "Agent network project created successfully"
}
create_and_manage_api_instances
Create and configure API instances in Anypoint API Manager.
| Parameter | Description | Required? |
|---|---|---|
|
The ID of the organization where the instance resides. The default is the ID of the user’s organization from the current session. |
No |
|
The name of the environment where the instance resides. The default is the environment for the organization specified in |
No |
|
Instance ID of the API. |
No Required if you’re configuring an API instance. |
|
Label or name of the API instance. |
No |
|
Operation to perform on the API instance. Valid values are:
|
Yes |
|
Group ID of the API asset in Anypoint Exchange. |
No |
|
ID of the API asset in Anypoint Exchange. Value can be the API name. |
No Required to create an API instance. |
|
Version of the API asset in Anypoint Exchange. |
No |
|
Engine the API instance runs on. Valid value is |
No |
|
Valid value is |
No |
|
Endpoint URI of the API instance (upstream). |
No Required if |
|
Consumer endpoint of the API instance. |
No |
|
Provider ID of the API instance. |
No |
{
"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"
}
}
{
"success": true,
"apiInstanceId": "12345",
"apiInstanceLabel": "Customer Management API",
"assetId": "customer-api",
"assetVersion": "1.0.0",
"endpointUri": "https://backend.example.com/api/customers",
"consumerEndpoint": "https://api.example.com/customers",
"status": "active",
"message": "API instance created successfully"
}
create_and_manage_assets
Create, update, and delete assets in Anypoint Exchange.
| Parameter | Description | Required? |
|---|---|---|
|
Operation to perform on the asset. Valid values are:
|
Yes |
|
Group ID of the asset in Anypoint Exchange. |
No |
|
The ID of the asset. |
No |
|
Version of the asset, for example, |
No Required for asset creation. |
|
The ID of the org to publish the asset to. |
No Optional for asset creation. |
|
The type of asset. Valid values are:
|
No Required for asset creation. |
|
The name of the asset. |
No
|
|
The description of the asset to create or update. |
No |
|
The URL of the asset. |
No Required when creating wsdl or http assets. |
|
The product version of API assets. |
No Required when creating raml, oas, wsdl, or http assets. |
|
The main file of the asset. |
No Required when creating raml, raml-fragment, oas, and wsdl assets. |
|
A stringified array of dependency JSON objects, where each object consists of |
No Required when creating api-group assets. |
|
The version of the API spec format. |
No Required for asset creation. |
|
Stringified value of a Design Center JSON object describing the asset |
No |
|
Stringified array of string values to save as the asset’s attributes. Use to find assets by keyword. Used for asset creation. |
No |
|
Stringified array of string values to save as the asset’s tags. Used for asset creation. |
No |
|
The asset project file or project root directory. |
No Required for raml, raml-fragment, oas, evented-api, wsdl, mule-plugin, and mule-application asset creation. |
|
Type of asset deletion to perform. Valid values are:
The default value is |
No |
|
New contact name for the asset. Used for updating the asset. |
No |
|
New contact email of the asset. Used for updating the asset. |
No |
|
Path to the icon file (image formats such as PNG and JPG) to add to the asset. Used for updating the asset. |
No |
|
Path to the asset properties file. File name should be |
No Optional for asset creation. |
{
"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\"]"
}
}
{
"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"
}
}
{
"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"
}
{
"success": true,
"operation": "update",
"groupId": "com.mycompany.apis",
"assetId": "customer-management-api",
"updatedFields": ["description", "contactName", "contactEmail"],
"message": "Asset updated successfully in Anypoint Exchange"
}
create_and_manage_metadata
Define metadata for a flow component, attach metadata to Mule flow components, and update existing metadata. To define metadata, provide the Mule configuration file URI and sample data or schema. To apply metadata, specify existing metadata types. To update metadata, provide new schema or sample data.
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Path of the Mule project directory where the |
Yes |
|
Task to perform. Valid values are:
|
Yes |
|
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 |
No Required when the operation parameter value is |
|
The format of the metadata to process. Specify |
No |
|
Path of the sample metadata or schema file. To specify if this metadata is for input or output, use the |
No Required when the operation parameter value is |
|
The |
No
|
|
Name of the new metadata to define based on a sample data JSON, for example, |
No Required when the operation parameter value is |
|
Whether the metadata is a schema. |
Yes Required when the operation parameter value is |
|
Specifies whether the metadata is for the component’s input or output. If not specified, metadata is used for input. |
No
|
|
Name of existing metadata type to apply to the flow component node. To specify if this metadata is for input or output, use the |
No Required when the operation parameter value is |
|
Whether to list all available metadata types in the project. Use this parameter to discover existing metadata. |
No |
|
Name of existing metadata type to update. |
No Required when the operation parameter value is |
|
Description of the tool. |
No |
{
"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
}
}
{
"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
}
}
{
"success": true,
"operation": "define",
"metadataName": "CustomerData",
"dataFormat": "JSON",
"metadataPath": "/Users/developer/customer-api-project/src/main/resources/metadata/CustomerData.json",
"message": "Metadata 'CustomerData' defined successfully"
}
list_applications
Get information about all applications in the environment you specify, sorted by last update date and time, in descending order. You can also specify an optional deployment name.
| Parameter | Description | Required? |
|---|---|---|
|
Name of the environment to list applications from. |
Yes |
|
An application to search for. |
No |
|
ID of the organization to list applications from. |
No |
|
The page number of the result. |
No |
|
Set value to |
No |
|
Set value to |
No |
|
Set value to |
No |
|
If Valid values are The default value is |
No |
|
If |
No |
|
Page number of log. Maximum is 20. Default is 1. |
No |
{
"server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
"tool_name": "list_applications",
"arguments": {
"environmentName": "Production",
"page": 1
}
}
{
"server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
"tool_name": "list_applications",
"arguments": {
"environmentName": "Production",
"appName": "customer-integration-app",
"includeCpuMetrics": true,
"includeHeapMetrics": true,
"includeLogs": true,
"timeFrame": "1h",
"logLevel": "ERROR"
}
}
{
"success": true,
"environmentName": "Production",
"page": 1,
"totalApplications": 15,
"applications": [
{
"applicationId": "app-12345",
"applicationName": "customer-integration-app",
"status": "RUNNING",
"runtimeVersion": "4.9.4:2e-java17",
"lastUpdated": "2024-01-15T14:30:00Z",
"replicas": 2,
"vcoresUsed": 1.0,
"memoryUsed": "1GB",
"cpuMetrics": {
"averageCpuUsage": 45.2,
"maxCpuUsage": 78.5,
"timeFrame": "1h"
},
"heapMetrics": {
"usedHeapMB": 512,
"totalHeapMB": 1024,
"timeFrame": "1h"
},
"logs": [
{
"timestamp": "2024-01-15T14:25:00Z",
"level": "ERROR",
"message": "Connection timeout to external service",
"thread": "processor-thread-1"
}
]
},
{
"applicationId": "app-67890",
"applicationName": "order-processing-app",
"status": "RUNNING",
"runtimeVersion": "4.9.4:2e-java17",
"lastUpdated": "2024-01-14T09:15:00Z",
"replicas": 1,
"vcoresUsed": 0.5,
"memoryUsed": "512MB"
}
]
}
list_governance_rulesets
List governance rulesets that apply to a project along with the rules that form each ruleset. Includes rulesets added as project dependencies and centralized governance rulesets.
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Path to the project folder. The default is the current workspace. For absolute paths, use |
No |
{
"name": "list_governance_rulesets",
"arguments": {
"projectPath": "/Users/developer/projects/pet-store-api"
}
}
{
"rulesets": [
{
"name": "API Governance Ruleset",
"assetId": "api-governance-ruleset",
"groupId": "com.mulesoft.governance",
"version": "1.4.0",
"type": "dependency",
"rules": [
{
"name": "api-title-required",
"description": "API title is required",
"absolutePath": "/Users/developer/.mule/rulesets/api-governance-ruleset/rules/api-title-required.js",
"severity": "error"
},
{
"name": "api-version-required",
"description": "API version is required",
"absolutePath": "/Users/developer/.mule/rulesets/api-governance-ruleset/rules/api-version-required.js",
"severity": "error"
}
]
},
{
"name": "Centralized Security Ruleset",
"type": "centralized",
"rules": [
{
"name": "https-required",
"description": "HTTPS is required for all endpoints",
"absolutePath": "/Users/developer/.mule/rulesets/centralized/security/https-required.js",
"severity": "warning"
}
]
}
]
}
manage_api_instance_policy
Apply a new policy to an API instance and update an existing policy configuration.
| Parameter | Description | Required? |
|---|---|---|
|
The ID of the organization where instances reside. Default is the ID of the user’s organization from the current session. |
No |
|
The name of the environment where instances reside. Default is the environment for the organization specified in |
No |
|
ID of the API instance. |
Yes |
|
Operation to perform on the API instance policy. Use |
Yes |
|
ID of the policy to configure. |
No Required to update an existing policy configuration. |
|
Configuration object for the policy. |
No Required to apply a new policy. |
|
Group ID of the policy asset in Anypoint Exchange. |
No Required to apply a new policy. |
|
Asset ID of the policy asset in Anypoint Exchange. |
No Required to apply a new policy. |
|
Version of the policy asset in Anypoint Exchange. |
No Required to apply a new policy. |
{
"server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
"tool_name": "manage_api_instance_policy",
"arguments": {
"apiInstanceId": "12345",
"operation": "apply",
"groupId": "68ef9520-24e9-4cf2-b2f5-620025690913",
"assetId": "rate-limiting-sla-based",
"assetVersion": "1.2.0",
"policyConfiguration": "{\"rateLimits\": [{\"maximumRequests\": 100, \"timePeriodInMilliseconds\": 60000}], \"clusterizable\": true}"
}
}
{
"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}"
}
}
{
"success": true,
"operation": "apply",
"apiInstanceId": "12345",
"policyId": "policy-new-123",
"policyName": "Rate Limiting - SLA Based",
"assetId": "rate-limiting-sla-based",
"version": "1.2.0",
"status": "applied",
"configuration": {
"rateLimits": [
{
"maximumRequests": 100,
"timePeriodInMilliseconds": 60000
}
],
"clusterizable": true
},
"message": "Policy applied successfully to API instance"
}
manage_flex_gateway_policy_project
Provide instructions to the LLM on how to manage a Flex Gateway custom policy project. Instructions include how to create the project, set up the configuration, build the project, publish a development version of the project, and publish a release version of the project.
Prerequisites: See Prerequisites.
| Parameter | Description | Required? |
|---|---|---|
|
Operation to perform on the Flex Gateway policy project. Use |
Yes |
|
Path to the Flex Gateway policy project directory. |
No |
|
Name of the policy project. |
No |
{
"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"
}
}
{
"success": true,
"operation": "create",
"instructions": [
"1. Install Rust and Cargo (if not already installed):",
" curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh",
"",
"2. Install the PDK CLI:",
" cargo install pdk-cli",
"",
"3. Create a new policy project:",
" pdk new custom-auth-policy --path /Users/developer/flex-policies",
"",
"4. Navigate to the project directory:",
" cd /Users/developer/flex-policies/custom-auth-policy",
"",
"5. Edit src/lib.rs to implement your policy logic",
"",
"6. Update Cargo.toml with policy metadata",
"",
"7. Test the policy:",
" cargo test",
"",
"8. Build the policy:",
" pdk build"
],
"projectStructure": {
"src/lib.rs": "Main policy implementation",
"Cargo.toml": "Project configuration and dependencies",
"definition/gcl.yaml": "Policy definition for API Manager",
"tests/": "Policy test files"
},
"nextSteps": "After creating the project, implement your custom authentication logic in src/lib.rs and define the policy schema in definition/gcl.yaml"
}
mock_api_spec
Test an endpoint’s functionality by making a request through a mocking service. Specify the endpoint, method, and payload sent to the endpoint as body content. If you don’t specify body content, then the tool looks for examples in the endpoint information in the API spec.
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
URL of the endpoint. |
Yes |
|
HTTP method to create the request to the mocking service. |
Yes |
|
Random, agent-generated UUID number that identifies the request to the mocking service. |
Yes |
|
Delimited string of headers sent to the endpoint. The delimiter character is \n. For example, |
No |
|
Body content sent to the endpoint as a string. Make sure to consider the endpoint’s expected media type. |
No |
|
Path to the project folder. The default is the current workspace. For absolute paths, use |
No |
{
"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"
}
}
{
"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\"}"
}
}
{
"success": true,
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"statusCode": 200,
"responseHeaders": {
"Content-Type": "application/json",
"X-Request-ID": "550e8400-e29b-41d4-a716-446655440000"
},
"responseBody": "{\"pets\": [{\"id\": \"1\", \"name\": \"Fluffy\", \"category\": \"cat\", \"status\": \"available\"}, {\"id\": \"2\", \"name\": \"Buddy\", \"category\": \"dog\", \"status\": \"available\"}]}",
"responseTime": 45,
"message": "Mock request completed successfully"
}
modify_munit_test
Modify or fix an existing MUnit test case, including updating assertions, mocks, payloads, and test logic.
| Parameter | Description | Required? |
|---|---|---|
|
The Mule flow definition, in XML format, for which an MUnit test needs to be generated. Do not include the namespace declaration. Only send the complete flow definition. |
Yes |
|
A prompt that explains the validation of the test case, for example, "Verify the flow returns a 400 error when an invalid payload is received." |
Yes |
|
A JSON object containing flow dependencies referenced by the main flow. The object must include |
Yes |
|
The XML source of the existing MUnit test case that needs to be modified, including the <munit:test> element and all nested components, such as mocks, variables, and assertions. |
Yes |
{
"server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
"tool_name": "manage_flex_gateway_policy_project",
"arguments": {
"projectSource": "<flow name=\"customer-api-flow\" doc:id=\"abc123\">\n <http:listener doc:name=\"Listener\" doc:id=\"def456\" config-ref=\"HTTP_Listener_config\" path=\"/customers/{customerId}\" allowedMethods=\"GET\"/>\n <logger level=\"INFO\" doc:name=\"Log Request\" doc:id=\"ghi789\" message=\"Processing request for customer: #[attributes.uriParams.customerId]\"/>\n <flow-ref doc:name=\"validate-customer-id\" doc:id=\"jkl012\" name=\"validate-customer-id\"/>\n <db:select doc:name=\"Get Customer\" doc:id=\"mno345\" config-ref=\"Database_Config\">\n <db:sql><![CDATA[SELECT * FROM customers WHERE id = :customerId AND status = 'ACTIVE']]></db:sql>\n <db:input-parameters><![CDATA[#[{customerId: attributes.uriParams.customerId}]]]></db:input-parameters>\n </db:select>\n <choice doc:name=\"Choice\" doc:id=\"pqr678\">\n <when expression=\"#[sizeOf(payload) > 0]\">\n <ee:transform doc:name=\"Transform Customer\" doc:id=\"stu901\">\n <ee:message>\n <ee:set-payload><![CDATA[%dw 2.0\noutput application/json\n---\n{\n customerId: payload[0].id,\n customerName: payload[0].name,\n emailAddress: payload[0].email,\n accountStatus: \"active\",\n lastUpdated: now()\n}]]></ee:set-payload>\n </ee:message>\n </ee:transform>\n </when>\n <otherwise>\n <set-payload value='#[{\"error\": \"Customer not found or inactive\", \"code\": \"CUSTOMER_NOT_FOUND\"}]' doc:name=\"Customer Not Found\" doc:id=\"vwx234\"/>\n <set-variable value=\"404\" doc:name=\"Set Status\" doc:id=\"yz567\" variableName=\"httpStatus\"/>\n </otherwise>\n </choice>\n</flow>",
"prompt": "The existing test is failing because the flow was updated to include a status filter in the database query and the response structure changed. Update the test to use the new field names (customerId instead of id, customerName instead of name, emailAddress instead of email) and add the lastUpdated field validation. Also update the mock to include the status field in the database response.",
"dependencies": {
"flowDependencies": [
{
"source": "<sub-flow name=\"validate-customer-id\" doc:id=\"validate123\">\n <validation:is-not-empty doc:name=\"Validate ID Not Empty\" doc:id=\"val456\" value=\"#[attributes.uriParams.customerId]\" message=\"Customer ID is required\"/>\n <validation:matches-regex doc:name=\"Validate ID Format\" doc:id=\"val789\" value=\"#[attributes.uriParams.customerId]\" regex=\"^[0-9]+$\" message=\"Customer ID must be numeric\"/>\n</sub-flow>",
"name": "validate-customer-id"
}
]
},
"existingMunit": "<munit:test name=\"customer-api-flow-successful-retrieval\" description=\"Verify the flow returns customer data when a valid customer ID is provided\">\n <munit:behavior>\n <set-variable variableName=\"testCustomerId\" value=\"12345\"/>\n <munit-tools:mock-when doc:name=\"Mock Database Response\" processor=\"db:select\">\n <munit-tools:with-attributes>\n <munit-tools:with-attribute whereValue=\"mno345\" attributeName=\"doc:id\"/>\n </munit-tools:with-attributes>\n <munit-tools:then-return>\n <munit-tools:payload value='#[[{\"id\": 12345, \"name\": \"John Doe\", \"email\": \"john.doe@example.com\"}]]'/>\n </munit-tools:then-return>\n </munit-tools:mock-when>\n </munit:behavior>\n <munit:execution>\n <flow-ref name=\"customer-api-flow\"/>\n </munit:execution>\n <munit:validation>\n <munit-tools:assert-that doc:name=\"Assert Payload is Not Empty\" expression=\"#[payload]\" is=\"#[MunitTools::notNullValue()]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Customer ID\" actual=\"#[payload.id]\" expected=\"#[12345]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Customer Name\" actual=\"#[payload.name]\" expected=\"#[\\\"John Doe\\\"]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Customer Email\" actual=\"#[payload.email]\" expected=\"#[\\\"john.doe@example.com\\\"]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Customer Status\" actual=\"#[payload.status]\" expected=\"#[\\\"active\\\"]\"/>\n </munit:validation>\n </munit:test>"
}
}
{
"success": true,
"message": "MUnit test case modified successfully",
"details": {
"testCaseName": "customer-api-flow-successful-retrieval",
"modificationType": "field_mapping_update",
"changesApplied": [
"Updated database mock to include status field",
"Changed assertion field names to match new response structure",
"Added validation for lastUpdated field",
"Updated mock data to reflect active status requirement"
],
"modifiedTestCase": "<munit:test name=\"customer-api-flow-successful-retrieval\" description=\"Verify the flow returns customer data when a valid customer ID is provided\">\n <munit:behavior>\n <set-variable variableName=\"testCustomerId\" value=\"12345\"/>\n <munit-tools:mock-when doc:name=\"Mock Database Response\" processor=\"db:select\">\n <munit-tools:with-attributes>\n <munit-tools:with-attribute whereValue=\"mno345\" attributeName=\"doc:id\"/>\n </munit-tools:with-attributes>\n <munit-tools:then-return>\n <munit-tools:payload value='#[[{\"id\": 12345, \"name\": \"John Doe\", \"email\": \"john.doe@example.com\", \"status\": \"ACTIVE\"}]]'/>\n </munit-tools:then-return>\n </munit-tools:mock-when>\n </munit:behavior>\n <munit:execution>\n <flow-ref name=\"customer-api-flow\"/>\n </munit:execution>\n <munit:validation>\n <munit-tools:assert-that doc:name=\"Assert Payload is Not Empty\" expression=\"#[payload]\" is=\"#[MunitTools::notNullValue()]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Customer ID\" actual=\"#[payload.customerId]\" expected=\"#[12345]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Customer Name\" actual=\"#[payload.customerName]\" expected=\"#[\\\"John Doe\\\"]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Customer Email\" actual=\"#[payload.emailAddress]\" expected=\"#[\\\"john.doe@example.com\\\"]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Account Status\" actual=\"#[payload.accountStatus]\" expected=\"#[\\\"active\\\"]\"/>\n <munit-tools:assert-that doc:name=\"Assert Last Updated Exists\" expression=\"#[payload.lastUpdated]\" is=\"#[MunitTools::notNullValue()]\"/>\n <munit-tools:assert-that doc:name=\"Assert Last Updated is DateTime\" expression=\"#[payload.lastUpdated]\" is=\"#[MunitTools::instanceOf(DateTime)]\"/>\n </munit:validation>\n </munit:test>",
"beforeAfterComparison": {
"mockChanges": {
"before": "Mock returned: {\"id\": 12345, \"name\": \"John Doe\", \"email\": \"john.doe@example.com\"}",
"after": "Mock returns: {\"id\": 12345, \"name\": \"John Doe\", \"email\": \"john.doe@example.com\", \"status\": \"ACTIVE\"}"
},
"assertionChanges": [
{
"before": "payload.id",
"after": "payload.customerId",
"reason": "Field renamed in flow transformation"
},
{
"before": "payload.name",
"after": "payload.customerName",
"reason": "Field renamed in flow transformation"
},
{
"before": "payload.email",
"after": "payload.emailAddress",
"reason": "Field renamed in flow transformation"
},
{
"added": "payload.lastUpdated validation",
"reason": "New field added to flow output"
}
]
},
"testExecutionReady": true,
"nextSteps": [
"Replace the existing test case in the MUnit file with this modified version",
"Run the test to verify it passes with the updated flow",
"Consider adding additional test cases for inactive customer scenarios",
"Verify all related test cases are updated for consistency"
]
}
}
open_project
Open a project. For example, an API spec or an agent network project.
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Path to the project folder. The default is the current workspace. For absolute paths, use |
No |
|
Whether the project opens in a new VS Code window (true) or not (false). The default is false. |
No |
|
Whether the project opens in a new folder in the workspace (true) or not (false). If true, then |
No |
{
"name": "open_project",
"arguments": {
"projectPath": "file:///Users/developer/projects/pet-store-api",
"newWindow": false,
"addToWorkspace": false
}
}
{
"name": "open_project",
"arguments": {
"projectPath": "file:///Users/developer/projects/customer-api",
"newWindow": false,
"addToWorkspace": true
}
}
{
"success": true,
"projectPath": "file:///Users/developer/projects/pet-store-api",
"openedInNewWindow": false,
"addedToWorkspace": false,
"message": "Project opened successfully in current window"
}
publish_agent_network_assets
Publish agent network assets to Anypoint Exchange for reuse. Specify the location, asset version, and optional organization or business group.
Prerequisite: The agent network project must contain a valid exchange.json file.
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Path to the agent network project to publish. |
No |
|
Semantic version for the asset (such as |
Yes |
|
Organization/business group ID (falls back to project configuration). |
No |
{
"name": "publish_agent_network_assets",
"arguments": {
"projectPath": "/Users/developer/projects/my-agent-network",
"assetVersion": "1.0.0",
"groupId": "com.example.organization"
}
}
{
"success": true,
"assetId": "my-agent-network",
"groupId": "com.example.organization",
"version": "1.0.0",
"exchangeUrl": "https://anypoint.mulesoft.com/exchange/com.example.organization/my-agent-network/1.0.0/",
"message": "Agent network assets published successfully to Exchange"
}
run_local_mule_application
Run application locally in Mule runtime. This tool handles the full local deployment workflow:
-
If needed, it builds the project.
-
If needed, it downloads runtime.
-
It starts the application locally.
| Parameter | Description | Required? |
|---|---|---|
|
Path to the Mule project directory to run locally. |
Yes |
|
Get JAVA_HOME from JDK from |
Yes |
{
"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"
}
}
{
"success": true,
"projectPath": "/Users/developer/customer-integration-app",
"javaHome": "/Users/developer/.anypoint/AnypointCodeBuilder/jdk-17.0.9+9",
"runtimeVersion": "4.9.4-2e",
"runtimePath": "/Users/developer/.mule/runtimes/mule-enterprise-standalone-4.9.4",
"deploymentStatus": "starting",
"applicationUrl": "http://localhost:8081",
"pid": 12345,
"logFile": "/Users/developer/.mule/logs/mule_ee.log",
"message": "Mule application is starting locally. Check logs for deployment status."
}
search_asset
Search for an asset in Anypoint Exchange by name or other specified parameters. Returns the first asset that matches the input criteria.
| Parameter | Description | Required? |
|---|---|---|
|
The query with criteria for the search. To specify multiple values, use comma-separated values as a single string. Parameter must include at least one value. |
No |
|
Show results that match the asset type filters. |
No |
|
Show results that match the status. Valid values are |
No |
|
The ID of the organization you want to search. The default value is the ID of the user’s organization from the current session. |
No |
|
Include shared assets in the results. |
No |
|
Sort search results. Valid values are |
No |
|
Sort results in ascending order. |
No |
|
The maximum number of assets to return in the result set. Range is between 1-10. Parameter must include at least one value. |
No |
{
"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
}
}
{
"success": true,
"searchQuery": "customer API",
"totalResults": 3,
"maxResults": 5,
"assets": [
{
"groupId": "com.mycompany.apis",
"assetId": "customer-management-api",
"version": "1.0.0",
"name": "Customer Management API",
"type": "raml",
"status": "published",
"description": "RESTful API for managing customer data and operations",
"exchangeUrl": "https://anypoint.mulesoft.com/exchange/com.mycompany.apis/customer-management-api/1.0.0/",
"lastModified": "2024-01-15T10:30:00Z",
"createdBy": "developer@mycompany.com"
},
{
"groupId": "com.example.apis",
"assetId": "customer-data-api",
"version": "2.1.0",
"name": "Customer Data API",
"type": "oas",
"status": "published",
"description": "OpenAPI specification for customer data services",
"exchangeUrl": "https://anypoint.mulesoft.com/exchange/com.example.apis/customer-data-api/2.1.0/",
"lastModified": "2024-01-12T14:20:00Z",
"createdBy": "api-team@example.com"
}
]
}
test_connection
Test a connector configuration for a Mule project. For example, test connectivity for an HTTP listener connection.
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Fully qualified URI of the Mule configuration XML file that contains the connector configuration. A valid value starts with |
Yes |
|
Value of the name attribute of the connection configuration component in the Mule configuration XML. XPath expressions aren’t supported. |
Yes |
{
"name": "test_connection",
"arguments": {
"configurationUri": "file:///Users/developer/customer-integration-app/src/main/mule/global.xml",
"configurationName": "HTTP_Listener_config"
}
}
{
"success": true,
"configurationName": "HTTP_Listener_config",
"connectionTest": "PASSED",
"testDuration": 1250,
"message": "Connection test successful",
"details": {
"host": "0.0.0.0",
"port": 8081,
"protocol": "HTTP",
"status": "Available"
}
}
uc_create_connector_workflow
Create a complete LinkWeave connector end-to-end with guided workflow planning. Supports two flows: generating an API spec from documentation, or using an existing API spec file. Returns a detailed workflow plan with numbered steps to execute sequentially.
Available only in Connector Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Any specific workflow customizations, preferences, or requirements for the connector-creation process. |
No |
|
Flow selection. Valid values are:
|
No |
|
Absolute path to existing API spec file (OpenAPI/Swagger YAML or JSON) if using |
No |
{
"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."
}
}
{
"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."
}
}
{
"success": true,
"flow": "generate-spec",
"workflowPlan": [
{
"step": 1,
"title": "Gather API Documentation",
"description": "Collect official API documentation URLs and identify key use cases",
"tool": "uc_generate_api_spec",
"estimatedTime": "5-10 minutes"
},
{
"step": 2,
"title": "Generate API Specification",
"description": "Create OpenAPI 3.0 specification from documentation and use cases",
"tool": "uc_generate_api_spec",
"estimatedTime": "10-15 minutes"
},
{
"step": 3,
"title": "Generate Connector Project",
"description": "Create LinkWeave connector project with CCM and Anypoint phases",
"tool": "uc_generate_connector",
"estimatedTime": "15-20 minutes"
},
{
"step": 4,
"title": "Test and Validate",
"description": "Test connector functionality and validate against use cases",
"tool": "test_connection",
"estimatedTime": "10-15 minutes"
}
],
"totalEstimatedTime": "40-60 minutes",
"nextSteps": "Begin with step 1 by providing the platform name, use cases, and documentation URLs to the uc_generate_api_spec tool.",
"customizations": [
"Focus on lead and opportunity management endpoints",
"Include OAuth 2.0 authentication configuration",
"Implement comprehensive error handling",
"Add retry logic for rate limiting"
]
}
create_api_spec_project
Create and scaffold an API spec or fragment project. You can specify the project name, location, and spec language (RAML or OAS).
| Parameter | Description | Required? |
|---|---|---|
|
Name of the API spec project. |
Yes |
|
Directory path in which to create the project. |
Yes |
|
Specification language for the API project. Valid values are:
|
Yes |
{
"name": "create_api_spec_project",
"arguments": {
"projectName": "Pet Store API",
"projectPath": "/Users/developer/projects",
"language": "oas",
"languageVersion": "3.0",
"format": "yaml",
"isApiEnabledForTopicsAndActions": true
}
}
{
"name": "create_api_spec_project",
"arguments": {
"projectName": "User Management API",
"projectPath": "/Users/developer/projects",
"language": "raml",
"languageVersion": "1.0",
"format": "yaml"
}
}
{
"name": "create_api_spec_project",
"arguments": {
"projectName": "Common Traits",
"projectPath": "/Users/developer/projects",
"language": "raml-fragment",
"languageVersion": "1.0",
"fragmentType": "trait",
"format": "yaml"
}
}
{
"success": true,
"projectPath": "/Users/developer/projects/pet-store-api",
"filesCreated": [
"pet-store-api.yaml",
"exchange.json",
"README.md"
],
"specType": "oas",
"specVersion": "3.0",
"message": "API spec project created successfully"
}
create_mule_project
Create a new Mule project without flow generation. This tool focuses only on the project structure setup with optional parameters.
| Parameter | Description | Required? |
|---|---|---|
|
Directory to create the project in. Default is the current workspace. |
No |
|
Name for the project. Default is a generated name. |
No |
{
"server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
"tool_name": "create_mule_project",
"arguments": {
"projectPath": "/Users/developer/projects",
"projectName": "customer-integration-app"
}
}
{
"success": true,
"projectPath": "/Users/developer/projects/customer-integration-app",
"projectName": "customer-integration-app",
"filesCreated": [
"pom.xml",
"src/main/mule/app.xml",
"src/main/resources/application.properties",
"src/test/munit/test-suite.xml"
],
"message": "Mule project created successfully"
}
create_MCP_server
Create a MuleSoft MCP server. This tool handles requests for creating MCP servers using Anypoint Connector for MCP (MCP Connector).
Prerequisite: Install MCP Connector.
| Parameter | Description | Required? |
|---|---|---|
|
Path location of the Mule project folder. |
Yes |
|
Path to the Mule project XML file. |
Yes |
|
The original user input without modifications. Use this for requests to create MCP servers. |
Yes |
{
"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"
}
}
{
"success": true,
"projectPath": "/Users/developer/mcp-server-project",
"mcpServerCreated": true,
"connectorAdded": true,
"configurationFiles": [
"src/main/mule/mcp-server-config.xml",
"src/main/resources/mcp-server.properties"
],
"message": "MCP server created successfully with MCP Connector integration"
}
dataweave_create_documentation
Generates DataWeave documentation using the proper syntax and returns the content for manual insertion into the project.
| Parameter | Description | Required? |
|---|---|---|
|
Detailed description of what the function does. |
Yes |
|
Any parameters applicable to the function. |
Yes |
|
An example of how to use the function. |
Yes |
{
"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"
}
}
}
{
"success": true,
"documentation": "/**\n * Calculates the total price including tax for a list of items. This function takes an array of items with price and quantity, applies the tax rate, and returns the total amount.\n *\n * @param items Array of items containing price per unit and quantity for each item\n * @param taxRate Tax rate as a decimal (e.g., 0.08 for 8% tax)\n * @return Number The total amount including tax\n *\n * @example Calculate total with tax for shopping cart items\n * calculateTotalWithTax([{price: 10.50, quantity: 2}, {price: 25.00, quantity: 1}], 0.08)\n * // Returns: 46.44\n */",
"message": "DataWeave documentation generated successfully"
}
dataweave_create_project
Creates a new DataWeave project, returns the URL of the created project, and prompts to open the project.
| Parameter | Description | Required? |
|---|---|---|
|
The group ID of the project. |
No |
|
The project name. |
Yes |
|
The URL location where you want to create the new project. The default, if not specified, is |
No |
{
"tool_name": "dataweave_create_project",
"arguments": {
"groupId": "com.mycompany.dataweave",
"projectName": "customer-data-transformer",
"url": "file:///Users/developer/dataweave-projects/"
}
}
{
"success": true,
"projectUrl": "file:///Users/developer/dataweave-projects/customer-data-transformer",
"projectName": "customer-data-transformer",
"groupId": "com.mycompany.dataweave",
"filesCreated": [
"pom.xml",
"src/main/dw/transform.dwl",
"src/test/dw/transformTest.dwl",
"README.md"
],
"message": "DataWeave project created successfully. Would you like to open the project?"
}
dataweave_create_sample_data
Create DataWeave input sample data for a given DataWeave transformation file and return the path where it was created. For example, use this tool to create sample data for a variable if a preview fails with There is no variable named 'variableName'.
Prerequisite: Create the DataWeave script file before running dataweave_create_sample_data. For information about DataWeave scripts, see DataWeave Scripts
| Parameter | Description | Required? |
|---|---|---|
|
The URL of the DataWeave transformation file to create sample input for. The file must be in the format of |
Yes |
|
The content of the sample input. |
Yes |
|
The file extension for the sample content file type. For example |
Yes |
|
The name of the input to generate, such as |
Yes |
{
"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"
}
}
{
"success": true,
"sampleDataPath": "file:///Users/developer/my-dataweave-project/src/test/resources/sample_data/json/payload.json",
"fileName": "payload.json",
"extension": "json",
"variableName": "payload",
"message": "Sample data created successfully for variable 'payload'"
}
dataweave_get_module_metadata
Returns the list of all functions available in a DataWeave module, with documentation for each function, the input parameter types, and the output types. It includes the list of labels for each function to use when searching.
| Parameter | Description | Required? |
|---|---|---|
|
The URL of the project in the format |
Yes |
|
The URL of the DataWeave module file in the format |
Yes |
{
"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"
}
}
{
"success": true,
"moduleUrl": "file:///Users/developer/my-dataweave-project/src/main/dw/utils/StringUtils.dwl",
"moduleName": "StringUtils",
"functions": [
{
"name": "capitalize",
"documentation": "Capitalizes the first letter of each word in a string",
"inputParameters": [
{
"name": "text",
"type": "String",
"description": "The input string to capitalize"
}
],
"outputType": "String",
"labels": ["string", "text", "format", "capitalize"],
"signature": "capitalize(text: String): String",
"example": {
"input": "capitalize(\"hello world\")",
"output": "\"Hello World\""
}
},
{
"name": "removeWhitespace",
"documentation": "Removes all whitespace characters from a string",
"inputParameters": [
{
"name": "input",
"type": "String",
"description": "The string to remove whitespace from"
}
],
"outputType": "String",
"labels": ["string", "whitespace", "clean", "trim"],
"signature": "removeWhitespace(input: String): String",
"example": {
"input": "removeWhitespace(\" hello world \")",
"output": "\"helloworld\""
}
},
{
"name": "splitAndFilter",
"documentation": "Splits a string by delimiter and filters out empty values",
"inputParameters": [
{
"name": "text",
"type": "String",
"description": "The string to split"
},
{
"name": "delimiter",
"type": "String",
"description": "The delimiter to split by"
}
],
"outputType": "Array<String>",
"labels": ["string", "split", "array", "filter"],
"signature": "splitAndFilter(text: String, delimiter: String): Array<String>",
"example": {
"input": "splitAndFilter(\"a,,b,c,\", \",\")",
"output": "[\"a\", \"b\", \"c\"]"
}
}
],
"variables": [
{
"name": "DEFAULT_DELIMITER",
"type": "String",
"value": "\",\"",
"documentation": "Default delimiter used for string operations"
}
],
"namespaces": [
{
"prefix": "str",
"uri": "dw::core::Strings"
}
],
"types": [
{
"name": "ProcessingOptions",
"type": "Object",
"properties": [
{
"name": "caseSensitive",
"type": "Boolean",
"optional": true
},
{
"name": "trimWhitespace",
"type": "Boolean",
"optional": true
}
]
}
]
}
dataweave_get_project_metadata
Returns the metadata of a DataWeave project (including the list of source folders and test folders) that defines where to create the files. The tool output includes the list of available modules with their URL, and all the functions, variables, namespaces, and types. The output also includes the list of all the data formats supported by the project. Call this tool before generating any code.
| Parameter | Description | Required? |
|---|---|---|
|
The URL of the project in the format |
Yes |
{
"tool_name": "dataweave_get_project_metadata",
"arguments": {
"url": "file:///Users/developer/my-dataweave-project"
}
}
{
"success": true,
"projectUrl": "file:///Users/developer/my-dataweave-project",
"sourceDirectories": [
"src/main/dw",
"src/main/resources"
],
"testDirectories": [
"src/test/dw",
"src/test/resources"
],
"modules": [
{
"name": "dw::core::Arrays",
"url": "jar://dw-core-modules-2.4.0-20211109.jar!/dw/core/Arrays.dwl",
"functions": [
{
"name": "join",
"signature": "join(Array<T>, String): String"
},
{
"name": "reduce",
"signature": "reduce(Array<T>, (item: T, accumulator: R) -> R): R -> R"
}
]
},
{
"name": "StringUtils",
"url": "file:///Users/developer/my-dataweave-project/src/main/dw/utils/StringUtils.dwl",
"functions": [
{
"name": "capitalize",
"signature": "capitalize(String): String"
}
]
}
],
"supportedFormats": [
"json",
"xml",
"csv",
"yaml",
"java",
"multipart"
],
"variables": [
{
"name": "PROJECT_VERSION",
"type": "String",
"value": "1.0.0"
}
],
"types": [
{
"name": "Customer",
"definition": "{customerId: String, name: String, email: String}"
}
]
}
dataweave_open_project
Opens a project from a given URL, either in the current window or in a new window.
| Parameter | Description | Required? |
|---|---|---|
|
The URL of the project to open, in the format |
Yes |
|
Whether to open the file in a new window ( |
No |
{
"tool_name": "dataweave_open_project",
"arguments": {
"url": "file:///Users/developer/my-dataweave-project",
"newWindow": false
}
}
{
"success": true,
"projectUrl": "file:///Users/developer/my-dataweave-project",
"openedInNewWindow": false,
"message": "DataWeave project opened successfully in current window"
}
dataweave_run_script_tool
Runs a DataWeave transformation using the sample data as input context and displays the output. Use to validate a script output. If the tool fails with missing input, create sample data using dataweave_create_sample_data tool.
| Parameter | Description | Required? |
|---|---|---|
|
The URL of the file to run the preview. The file must be in the format of |
Yes |
|
The content of the script to execute. |
Yes |
{
"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}"
}
}
{
"success": true,
"scriptUrl": "file:///Users/developer/my-dataweave-project/src/main/dw/customer-transform.dwl",
"output": "{\n \"fullName\": \"John Doe\",\n \"contact\": {\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1-555-123-4567\"\n },\n \"customerType\": \"standard\"\n}",
"executionTime": 45,
"outputMimeType": "application/json",
"message": "DataWeave script executed successfully"
}
deploy_agent_network
Deploy an agent network instance to a runtime environment. Specify the project path, target environment, deployment target, and Managed Flex Gateway configuration for deployment.
Prerequisites:
-
Managed Flex Gateway
-
A business group
-
A valid
exchange.jsonfile in the agent network project
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Path to the agent network project to deploy. |
No |
|
Target environment name (prompts for selection if not provided). |
No |
|
Private space name (prompts for selection if not provided). |
No |
|
Ingress gateway name (prompts for selection if not provided). |
No |
|
Egress gateway name (prompts for selection if not provided). |
No |
{
"name": "deploy_agent_network",
"arguments": {
"projectPath": "/Users/developer/projects/my-agent-network"
}
}
{
"success": true,
"deploymentId": "deployment-12345",
"projectPath": "/Users/developer/projects/my-agent-network",
"environment": "production",
"status": "deployed",
"deploymentUrl": "https://agent-network.example.com",
"deploymentTime": "2024-01-15T10:30:00Z",
"message": "Agent network deployed successfully"
}
deploy_mule_application
Deploy your application to CloudHub 2.0 or Runtime Fabric and run it. You can deploy from a local project or Anypoint Exchange asset. This tool supports security, high availability, and performance optimization deployment options.
| Parameter | Description | Required? |
|---|---|---|
|
Path to Maven project root directory. |
No |
|
The name of the application to deploy. |
No |
|
Name of the environment to deploy the app to. |
No |
|
Name of the deployment target. |
No |
|
Runtime version to use. |
No |
|
Group ID of the asset in Anypoint Exchange. |
No |
|
Artifact ID of the asset in Anypoint Exchange. |
No |
|
Version of the asset or application. |
No |
|
Whether to enable enhanced security features. The default is |
No |
|
Whether to enable high availability features. The default is |
No |
|
Whether to enable performance optimization features. The default is |
No |
|
Minimum number of replicas if high availability or performance optimization is enabled. Minimum is 1. |
No |
|
The ID of the organization to deploy the application to. |
No |
{
"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
}
}
{
"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"
}
}
{
"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:
-
Log in to Anypoint Code Builder with your Anypoint Platform credentials.
-
Enable Einstein in Access Management.
| Parameter | Description | Required? |
|---|---|---|
|
Language of the API specification to generate. Valid values are:
|
Yes |
|
|
Yes |
|
Syntax of the generated API spec.
|
Yes |
|
Valid value is |
Yes |
|
Input to the Large Language Model (LLM). |
Yes |
{
"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"
}
}
{
"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"
}
}
{
"success": true,
"specContent": "openapi: 3.0.0\ninfo:\n title: Pet Store API\n version: 1.0.0\npaths:\n /pets:\n get:\n summary: List all pets\n responses:\n '200':\n description: Successful response\n post:\n summary: Create a new pet\n requestBody:\n required: true\n content:\n application/json:\n schema:\n type: object\n properties:\n name:\n type: string\n category:\n type: string\n /pets/{id}:\n get:\n summary: Get pet by ID\n parameters:\n - name: id\n in: path\n required: true\n schema:\n type: string\n responses:\n '200':\n description: Successful response\n '404':\n description: Pet not found",
"message": "API spec generated successfully"
}
generate_mule_flow
Generate, modify, or enhance Mule flows. Use this tool for any request involving flow changes, including Java method calls, logging, Salesforce operations, adding connectors, transformations, or any flow modifications.
| Parameter | Description | Required? |
|---|---|---|
|
Path to the existing Mule project directory. |
Yes |
|
Path to the existing Mule project XML file. |
Yes |
|
The original user query without any modifications. Use for requests such as updating flows, adding Java methods, logging, Salesforce operations, connectors, or any flow changes. |
Yes |
{
"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."
}
}
{
"success": true,
"projectPath": "/Users/developer/customer-integration-app",
"flowsGenerated": [
{
"name": "customer-data-processing-flow",
"description": "Processes incoming customer data with validation and Salesforce integration",
"components": [
"HTTP Listener",
"Email Validator",
"Transform Message",
"Salesforce Create",
"Error Handler"
]
}
],
"connectorsAdded": [
"Salesforce Connector"
],
"configurationsCreated": [
"HTTP Listener Config",
"Salesforce Config"
],
"xmlUpdated": "/Users/developer/customer-integration-app/src/main/mule/app.xml",
"message": "Mule flow generated successfully with customer data processing capabilities"
}
generate_munit_test
Generates MUnit test cases for Mule flows, one test scenario at a time, with support for mocks, assertions, and dependencies.
| Parameter | Description | Required? |
|---|---|---|
|
The Mule flow definition, in XML format, for which an MUnit test needs to be generated. Do not include the namespace declaration. Only send the complete flow definition. |
Yes |
|
The file name of the MUnit test. |
Yes |
|
A prompt that explains the validation of the test case, for example, "Verify the flow returns a 400 error when an invalid payload is received." |
Yes |
|
The minimum runtime version required for the flow. |
Yes |
|
A JSON object containing flow dependencies referenced by the main flow. The object must include |
Yes |
{
"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"
}
]
}
}
}
{
"success": true,
"message": "MUnit test case generated successfully",
"details": {
"testCaseName": "customer-api-flow-successful-retrieval",
"munitFileName": "customer-api-test-suite.xml",
"testFilePath": "src/test/munit/customer-api-test-suite.xml",
"generatedTestCase": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mule xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xmlns:munit=\"http://www.mulesoft.org/schema/mule/munit\"\n xmlns:munit-tools=\"http://www.mulesoft.org/schema/mule/munit-tools\"\n xmlns:db=\"http://www.mulesoft.org/schema/mule/db\"\n xmlns=\"http://www.mulesoft.org/schema/mule/core\"\n xsi:schemaLocation=\"http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd\n http://www.mulesoft.org/schema/mule/munit http://www.mulesoft.org/schema/mule/munit/current/mule-munit.xsd\n http://www.mulesoft.org/schema/mule/munit-tools http://www.mulesoft.org/schema/mule/munit-tools/current/mule-munit-tools.xsd\n http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd\">\n\n <munit:config name=\"customer-api-test-suite.xml\"/>\n\n <munit:test name=\"customer-api-flow-successful-retrieval\" description=\"Verify the flow returns customer data when a valid customer ID is provided\">\n <!-- Test Setup -->\n <munit:behavior>\n <set-variable variableName=\"testCustomerId\" value=\"12345\"/>\n <munit-tools:mock-when doc:name=\"Mock Database Response\" processor=\"db:select\">\n <munit-tools:with-attributes>\n <munit-tools:with-attribute whereValue=\"mno345\" attributeName=\"doc:id\"/>\n </munit-tools:with-attributes>\n <munit-tools:then-return>\n <munit-tools:payload value='#[[{\"id\": 12345, \"name\": \"John Doe\", \"email\": \"john.doe@example.com\"}]]'/>\n </munit-tools:then-return>\n </munit-tools:mock-when>\n </munit:behavior>\n\n <!-- Test Execution -->\n <munit:execution>\n <flow-ref name=\"customer-api-flow\"/>\n </munit:execution>\n\n <!-- Test Verification -->\n <munit:validation>\n <munit-tools:assert-that doc:name=\"Assert Payload is Not Empty\" expression=\"#[payload]\" is=\"#[MunitTools::notNullValue()]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Customer ID\" actual=\"#[payload.id]\" expected=\"#[12345]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Customer Name\" actual=\"#[payload.name]\" expected=\"#[\\\"John Doe\\\"]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Customer Email\" actual=\"#[payload.email]\" expected=\"#[\\\"john.doe@example.com\\\"]\"/>\n <munit-tools:assert-equals doc:name=\"Assert Customer Status\" actual=\"#[payload.status]\" expected=\"#[\\\"active\\\"]\"/>\n </munit:validation>\n </munit:test>\n\n</mule>",
"mockComponents": [
{
"component": "db:select",
"docId": "mno345",
"mockType": "database_response",
"description": "Mocks database query response for customer retrieval"
}
],
"assertions": [
{
"type": "not_null",
"target": "payload",
"description": "Verifies response payload is not null"
},
{
"type": "equals",
"target": "payload.id",
"expected": "12345",
"description": "Validates customer ID in response"
},
{
"type": "equals",
"target": "payload.name",
"expected": "John Doe",
"description": "Validates customer name in response"
},
{
"type": "equals",
"target": "payload.email",
"expected": "john.doe@example.com",
"description": "Validates customer email in response"
},
{
"type": "equals",
"target": "payload.status",
"expected": "active",
"description": "Validates customer status in response"
}
],
"testScenario": "successful_retrieval",
"nextSteps": [
"Append this test case to the MUnit test file",
"Generate additional test cases for error scenarios",
"Run the test to verify it passes",
"Add more assertions if needed for complete coverage"
]
}
}
get_flex_gateway_policy_example
Get a Flex Gateway policy example to help you configure your Rust source code. Use this tool to get example policies that manipulate a request’s header and body, make HTTP and gRPC calls to external services, share data between requests and responses, reject requests, perform sleep operations, and use PDK libraries.
| Parameter | Description | Required? |
|---|---|---|
|
The type of policy feature to generate an example for. Valid values are:
|
Yes |
{
"server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
"tool_name": "get_flex_gateway_policy_example",
"arguments": {
"feature": "header_manipulation"
}
}
{
"success": true,
"feature": "header_manipulation",
"exampleCode": [
"use pdk::api::*;",
"use pdk::logger::info;",
"",
"#[entrypoint]",
"async fn configure(launcher: Launcher) -> Result<(), LaunchError> {",
" let filter = on_request(|request| {",
" // Add custom header to request",
" request.headers_mut().insert(",
" \"X-Custom-Header\",",
" \"custom-value\".parse().unwrap()",
" );",
" ",
" // Log the operation",
" info!(\"Added custom header to request\");",
" ",
" Ok(request)",
" });",
" ",
" launcher.launch(filter).await",
"}",
"",
"#[cfg(test)]",
"mod tests {",
" use super::*;",
" use pdk::test::*;",
" ",
" #[tokio::test]",
" async fn test_header_manipulation() {",
" let request = TestRequestBuilder::new()",
" .method(\"GET\")",
" .uri(\"/api/test\")",
" .build();",
" ",
" let response = execute_policy(request).await.unwrap();",
" ",
" assert!(response.headers().contains_key(\"X-Custom-Header\"));",
" assert_eq!(",
" response.headers()[\"X-Custom-Header\"],",
" \"custom-value\"",
" );",
" }",
"}"
],
"description": "Example Rust policy for manipulating request headers using the Flex Gateway Policy Development Kit (PDK)",
"dependencies": [
"pdk = { version = \"0.1.0\" }",
"tokio = { version = \"1.0\", features = [\"full\"] }"
],
"explanation": "This example demonstrates how to add custom headers to incoming requests using the PDK API. The policy uses the on_request filter to intercept requests and modify headers before they reach the backend service."
}
get_platform_insights
See how your organization leverages Anypoint Platform through usage and operational insights. These include:
-
Usage trends for apps, such as flow count, message counts, and data throughput by business group and environment. Usage trends are for the current month. If it’s early in the month, you get usage for the last full month.
-
API and app call volume across consumers for the last 7 days.
-
API and app performance metrics such as errors and latency for the last 7 days.
| Parameter | Description | Required? |
|---|---|---|
|
Name of the application or API. |
No |
|
Type of entity to get insights for. Use |
No |
|
Whether to include app usage trends for flows. The default value is |
No |
|
Whether to include app usage trends for messages. The default value is |
No |
|
Whether to include app usage trends for data throughput. The default value is |
No |
|
Whether to include error counts from apps and APIs. The default value is |
No |
|
Whether to include call volume from apps and APIs. The default value is |
No |
|
Whether to include P99 latency in the response time. The default value is |
No |
|
If
The default value is |
No |
{
"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"
}
}
{
"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
}
}
{
"success": true,
"timeRange": {
"usageTrends": "2024-01-01 to 2024-01-31",
"performanceMetrics": "2024-01-24 to 2024-01-31"
},
"usageTrends": {
"flows": {
"totalFlows": 245,
"activeFlows": 198,
"flowsById": [
{
"businessGroup": "Sales",
"environment": "Production",
"flowCount": 45
},
{
"businessGroup": "Marketing",
"environment": "Production",
"flowCount": 32
}
]
},
"messages": {
"totalMessages": 1250000,
"messagesByBusinessGroup": [
{
"businessGroup": "Sales",
"messageCount": 650000
},
{
"businessGroup": "Marketing",
"messageCount": 400000
}
]
},
"dataThroughput": {
"totalGB": 125.5,
"throughputByEnvironment": [
{
"environment": "Production",
"throughputGB": 98.2
},
{
"environment": "Staging",
"throughputGB": 27.3
}
]
}
},
"performanceMetrics": {
"callVolume": {
"totalCalls": 875000,
"dailyAverage": 125000,
"topConsumers": [
{
"consumerName": "Mobile App",
"calls": 325000
},
{
"consumerName": "Web Portal",
"calls": 250000
}
]
},
"latency": {
"percentile": "P95",
"averageLatencyMs": 145,
"latencyByApp": [
{
"appName": "customer-integration-app",
"p95LatencyMs": 89
}
]
},
"errors": {
"totalErrors": 1250,
"errorRate": 0.14,
"errorsByType": [
{
"errorType": "Timeout",
"count": 450
},
{
"errorType": "Connection",
"count": 320
}
]
}
}
}
get_reuse_metrics
Get visibility into assets reuse across your organization. Drive efficiency, consistency, and cost savings by reducing duplication. Includes sandbox and production environments. Metrics are a year-to-date snapshot.
| Parameter | Description | Required? |
|---|---|---|
|
Whether the output includes reuse metrics for applications. Default is false. |
No |
{
"server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
"tool_name": "get_reuse_metrics",
"arguments": {
"includeReuseMetrics": true
}
}
{
"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.
{
"name": "get_topics_agent_actions_metadata_instructions",
"arguments": {}
}
{
"topics": [
{
"id": "api-management",
"name": "API Management",
"description": "Topics related to API management operations",
"actions": [
{
"id": "create-api",
"name": "Create API",
"description": "Create a new API specification",
"instructions": "Use this action to create a new API specification. Provide the API name, version, and specification format."
}
],
"instructions": "Use these actions to manage APIs in your organization."
}
],
"metadata": {
"version": "1.0.0",
"lastUpdated": "2024-01-15T10:30:00Z"
}
}
implement_api_spec
Use APIkit flows to implement an API specification in a new integration project. You can implement a specification from a local project or an Anypoint Exchange asset.
| Parameter | Description | Required? |
|---|---|---|
|
Determines the operation type. To implement API specs in a local workspace, use |
Yes |
|
The name for the integration project. Also used as the project folder name. |
Yes |
|
The path where the project folder is located. The default is the current workspace. |
Yes |
|
[ |
Yes |
|
[ |
Yes |
|
[ |
Yes |
|
[ |
Yes |
|
[ |
No |
|
[ |
No |
|
[ |
No |
|
The runtime version to use. Uses the workspace configuration or the latest version available if not specified. |
No |
|
The JDK version to use. Uses the workspace configuration or the latest available if not specified. |
No |
|
The Maven group ID for the project. Defaults to the group ID of the API specification or workspace setting. |
No |
{
"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"
}
}
{
"success": true,
"message": "Mule project successfully scaffolded from API specification",
"details": {
"projectPath": "/Users/developer/mule-projects/customer-management-implementation",
"apiSpecification": {
"groupId": "com.acme.apis",
"assetId": "customer-management-api",
"version": "1.2.0",
"classifier": "raml",
"mainFile": "api.raml"
},
"projectConfiguration": {
"name": "customer-management-implementation",
"runtimeVersion": "4.6.0",
"jdkVersion": "17",
"mavenGroupId": "com.acme.implementations",
"artifactId": "customer-management-implementation"
},
"generatedFiles": [
"pom.xml",
"mule-artifact.json",
"src/main/mule/implementation.xml",
"src/main/resources/api/api.raml",
"src/main/resources/application.yaml",
"src/test/munit/implementation-test-suite.xml"
],
"endpoints": [
{
"method": "GET",
"path": "/customers",
"description": "Get all customers"
},
{
"method": "POST",
"path": "/customers",
"description": "Create a new customer"
},
{
"method": "GET",
"path": "/customers/{customerId}",
"description": "Get customer by ID"
},
{
"method": "PUT",
"path": "/customers/{customerId}",
"description": "Update customer"
},
{
"method": "DELETE",
"path": "/customers/{customerId}",
"description": "Delete customer"
}
],
"nextSteps": [
"Open the project in your workspace using the open_project tool",
"Implement business logic for each endpoint",
"Configure database connections if needed",
"Add error handling and validation",
"Test the implementation using MUnit"
]
}
}
list_api_instances
Get information for instances in an environment. You can also filter by an instance ID or label and include applied or available policies. Use the page parameter to paginate results.
Prompt tip: To get information for all instances, revise results using the page parameter.
| Parameter | Description | Required? |
|---|---|---|
|
ID of the organization where instances reside. Default is the ID of the default organization. |
No |
|
Name of the environment where instances reside. Default is the name of the default environment for the organization specified in |
No |
|
Instance ID of the API. |
No Required if |
|
Label or name of the API instance. |
No |
|
Page number of the results. Each page contains information for up to 10 instances. |
Yes |
|
Whether to include applied policies in results. |
No |
|
Whether to include available policies in results. Requires |
No |
{
"server_name": "https://www.npmjs.com/package/@mulesoft/mcp-server",
"tool_name": "list_api_instances",
"arguments": {
"environmentName": "Production",
"page": 1,
"includeAppliedPolicies": true
}
}
{
"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
}
}
{
"success": true,
"environmentName": "Production",
"page": 1,
"totalPages": 3,
"totalInstances": 25,
"instances": [
{
"apiInstanceId": "12345",
"apiInstanceLabel": "Customer Management API",
"assetId": "customer-api",
"assetVersion": "1.0.0",
"groupId": "com.mycompany.apis",
"runtimeEngine": "mule4",
"endpointUri": "https://backend.example.com/api/customers",
"consumerEndpoint": "https://api.example.com/customers",
"status": "active",
"appliedPolicies": [
{
"policyId": "rate-limiting-001",
"policyName": "Rate Limiting",
"version": "1.2.0",
"status": "applied"
},
{
"policyId": "basic-auth-002",
"policyName": "HTTP Basic Authentication",
"version": "1.0.0",
"status": "applied"
}
],
"availablePolicies": [
{
"policyName": "OAuth 2.0 Access Token Enforcement",
"assetId": "oauth-2-access-token-enforcement",
"groupId": "68ef9520-24e9-4cf2-b2f5-620025690913",
"version": "3.2.2",
"description": "Validates OAuth 2.0 access tokens"
}
]
},
{
"apiInstanceId": "67890",
"apiInstanceLabel": "Product Catalog API",
"assetId": "product-api",
"assetVersion": "2.1.0",
"groupId": "com.mycompany.apis",
"runtimeEngine": "mule4",
"endpointUri": "https://backend.example.com/api/products",
"consumerEndpoint": "https://api.example.com/products",
"status": "active",
"appliedPolicies": []
}
]
}
uc_generate_api_spec
Generate an OpenAPI 3.0 spec from use cases and API documentation. Analyzes documentation sources, discovers endpoints for the specified use cases, and creates both a discovery.json file and a complete OpenAPI YAML spec. If no parameters are used, the agent prompts for input.
Available only in Connector Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Name of the SaaS platform or service, for example, |
No |
|
List of integration use cases, ordered by priority. Each use case describes a specific integration scenario, for example, |
No |
|
List of official API documentation URLs. Must be valid URLs starting with |
No |
|
Any additional requirements, constraints, or preferences for the API spec, for example, specific authentication methods, rate limiting considerations, and version preferences. |
No |
|
Confirmation that all provided information is correct and ready for processing. |
No |
{
"name": "uc_generate_api_spec",
"arguments": {
"platform": "Stripe",
"useCases": [
"Sync customers into our CRM",
"Create a charge and issue a refund"
],
"documentation": [
"https://docs.stripe.com/api",
"https://docs.stripe.com/api/customers",
"https://docs.stripe.com/api/charges",
"https://docs.stripe.com/api/refunds"
],
"additionalRequirements": "OpenAPI 3.0 YAML. Use bearer token auth (Authorization: Bearer <apiKey>). Include common error responses (400/401/403/404/409/429/500). Model pagination where applicable.",
"userConfirmed": true
}
}
{
"success": true,
"message": "Generated discovery.json and OpenAPI 3.0 spec from documentation and use cases.",
"platform": "Stripe",
"discoveryJsonPath": "/Users/you/workspace/stripe-spec/discovery.json",
"openApiYamlPath": "/Users/you/workspace/stripe-spec/openapi.yaml"
}
uc_generate_connector
Generate a complete LinkWeave connector from an API spec. Supports flexible multi-phase generation including scaffolding, CCM (Canonical Connectivity Model), and Anypoint Connector. All endpoints from the API spec are used. Can execute phases individually or in combination.
Available only in Connector Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Absolute path to the API spec file (OpenAPI/Swagger YAML or JSON). |
No Required for |
|
Name for the connector project. |
No Required for |
|
Description for the connector project. |
No Required for |
|
Array of phases to execute - any combination of
|
No |
{
"tool_name": "uc_generate_connector",
"arguments": {
"apiSpec": "/Users/developer/apis/salesforce-api.yaml",
"projectName": "Salesforce Integration Connector",
"description": "Custom connector for Salesforce CRM integration with enhanced features.",
"phases": ["ccm"]
}
}
{
"success": true,
"message": "Connector generated successfully.",
"projectPath": "/Users/you/workspace/stripe-connector",
"phasesExecuted": [
"ccm",
"anypoint"
]
}
update_mule_application
Update a Mule application deployed to CloudHub 2.0 or Runtime Fabric. Update runtime version, configuration, and other application settings.
| Parameter | Description | Required? |
|---|---|---|
|
The ID of the application to update with the latest Mule runtime patch release. |
Yes |
|
The ID of the environment where the application is deployed. |
Yes |
|
The ID of the organization where the application is deployed. |
No |
|
Mule runtime version to use. For example, |
No |
|
Whether to enable persistent object store. The default is false. |
No |
|
Replica size for CloudHub 2.0 applications. Express size in vCores or instance type size. |
No |
|
Reserved vCPUs for the application. For example, 1. |
No |
|
Maximum vCPUs for the application. For example, 2. |
No |
|
Memory allocation for the allocation in GB. For example, 1. |
No |
|
Number of replicas. |
No |
|
If |
No |
|
If |
No |
|
Whether to enable autoscaling. The default is false. |
No |
|
Whether to enable application tracing. The default is false. |
No |
|
Whether to enforce deploying replicas across nodes (Runtime Fabric only). The default is false. |
No |
|
The deployment strategy for application updates. Use |
No |
|
Whether to enable clustering for the application. The default is false. |
No |
|
Whether to stop the application. The default is false. |
No |
|
Whether to start the application. The default is false. |
No |
|
Whether to enable high availability for the application. The default is false. |
No |
|
Whether to enable performance optimization. The default is false. |
No |
|
Whether to enable advanced security features. The default is false. |
No |
{
"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"
}
}
{
"success": true,
"message": "Application update initiated.",
"applicationId": "3f2d8b1a-0f2e-4f6c-9e44-6f3b2c1a9c10",
"environmentId": "b7c9f6f2-1f8d-4c2e-a7b0-3d6c9a1b2e34",
"deploymentModel": "rolling",
"status": "updating"
}
validate_api_against_ruleset
Validate an API specification in your project against governance rulesets or rules that you specify. If you specify all rulesets, the tool uses an empty rules parameter to validate all rulesets. Similarly, if you specify no ruleset, the tool uses an empty rules parameter. To find rules or rulesets that you specify, this tool calls the list_governance_rulesets tool.
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Path where the project folder is located. The default is the current workspace. For absolute paths, use |
No |
|
Array of API rules to validate. If empty, the tool validates all rulesets in |
No |
|
Whether the tool syncs centralized rulesets before validating the API specification. The default value is true. |
No |
{
"name": "validate_api_against_ruleset",
"arguments": {
"projectPath": "/Users/developer/projects/pet-store-api",
"rules": [],
"syncCentralizedRulesets": true
}
}
{
"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
}
}
{
"validationResults": {
"totalRules": 2,
"passed": 1,
"failed": 1,
"warnings": 0
},
"results": [
{
"ruleName": "api-title-required",
"status": "passed",
"message": "API title is present"
},
{
"ruleName": "api-version-required",
"status": "failed",
"message": "API version is missing",
"severity": "error",
"location": {
"file": "pet-store-api.yaml",
"line": 2,
"column": 5
}
}
],
"summary": "Validation completed with 1 error"
}
validate_project
Validate the current project. For example, an API spec or an agent network project. This tool doesn’t validate against API Governance rulesets. To validate against those rulesets, use the validate_api_against_ruleset tool.
Available only in Anypoint Code Builder.
| Parameter | Description | Required? |
|---|---|---|
|
Path where the project folder is located. The default is the current workspace. For absolute paths, use |
No |
{
"name": "validate_project",
"arguments": {
"projectPath": "/Users/developer/projects/pet-store-api"
}
}
{
"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"
}



