Skip to content

Commit c4522f9

Browse files
panizzagolamiral-mulesoftDavoCodermelamedjoelejouini
authored
MCP Server MVP: Merge to main (#232)
* Rebranding - Refactored the application to remove every mention to Metrics Framework - Fixed MUnit response payload that was causing unit tests to fail * Fixing naming convention and adding embedded dashboards readme section * Resolving APIM limit of 100 assets using pagination * Fixing readme * Adding MongoDB loader. * Fixing AM Loader metrics * Ading enable/disable option for the embedded dashboard * Usable vCores available for any BG should be vCores assigned less vCores reassigned. * Usable vCores available for any BG should be vCores assigned less vCores reassigned. * Usable vCores available for any BG should be vCores assigned less vCores reassigned. * Resolutions for PR57 * Update build-platform-metrics-aggregation.dwl * Tableu Strategy - Added platform metrics current consolidated dashboard - Changed tableau strategy JSON file generation rule - Changed tableau.path property to tableau.outputDir - Added tableau strategy request in postman collection - Updated README.md with tableau instructions * Splunk - Current Consolidated Dashboard Fixes - Fixed stats calculations (use sum instead of max for quantities) - Fixed typos * RawData var assignment Fixed rawData variable assignment: when setting loaderDetails from payload, rawData value was being retrieved from vars context instead of being retrieved from payload. * ARM API Max Concurrency ARM API call requests were failing with 503 (SERVICE UNAVAILABLE). Reducing ARM API max concurrent calls from 100 to 3 prevents this error to happen. * Overall Satisfaction Calculation Changed Overall Satisfaction Calculation to consider only rated assets (unrated assets shouldn't be considered when calculating overall satisfaction. * Log Messages - Fixed misleading log message when role groups collection is disabled - Added log messages when ARM Apps collection is disabled - Fixed log message typos * Issue #64 Fixed issue #64: platform benefits metrics loader default router should call platform benefits metrics default loader flow instead of platform metrics default loader flow. * Revert "Issue #64" This reverts commit c2ebcf9. * Issue #64 Fixes issue #64: platform benefits metrics loader default router should call platform benefits metrics default loader flow instead of platform metrics default loader flow. * Tableau Strategy - Added Cloudhub runtime manager metrics in current consolidated Tableau dashboard - Fixed current consolidated Tableau dashboard to look similar to Splunk verion. - Updated README.md file with further instructions regarding Tableau Strategy: limitation if MA is running on CH or RTF, and instructions about how to manually generate JSON files using JSON strategy. * Tableau Strategy Fixed Tableau Steps section in README.md * Changing API Platform logic in order to aggregate all available api applications/clients through a foreach * ELK loader fixes Fixed ELK bulk load HTTP request" -added Content-Type=application/json -used correct vars.index for metrics/benefits index Fixed flow reference name in loader-router for loader-benefits-elk-main-flow * Fix README typo for Tableau. Externalize path calculation in write operation for Tableau. Refactor external systems configuration files to include related HTTP config on each file, removing these from global.xml. Add note in README.md * PR fixes * fixes of the MongoDB loader * README fixes * Updating dependencies * upgrade to 4.2.2 as min version * Disabling MongoDB loader by default * Disabling MongoDB loader by default * Fixing logs * Fixed tests + adding new tests - 93.79 test coverage - refactor of some flows * 95.0 coverage + examples location refactor + poller adjustments * adding APIManager example payloads with apis and api instances, updating mocks * adding test for environment call failure * reformat * Update pom.xml * Increase artifact version * Add new incremental version of the artifact * OSV2 metrics added * OSV2 metrics added with munits fixed * Adding readme, group of api manager metrics for scatter gather room * Fixing indent * Fixing indent * Fixing indent * Fixing indent * Fixing indent * Fixing indent * Fixing indent * Fixing indent with apim grouped metrics * Issue #90 - Comma in BG names Updated README.md to instruct the users that changing the implementation may be required in some situations, and explaining how to configure CSV output formatting options. * Update README.md * Removing osv2 for connected apps * Adding details for CloudHub apps and API Manager * adding RTF and Standalone granular metrics * Refactor + covering MQ + unit tests * Adding osv2 details * Fixing munits * Add server, cluster, and serverGroup by environment and fix MUnit tests * Adding/Updating detailed metrics to have full consistency with aggregated sections * Missing ignoring osv2 in connected apps when set from payload * Missing ignoring osv2 in connected apps when set from query params * Fixing munit for the missing property in connected apps * Removing wrong dependency * Adding osv2 to the raml * Increasing version * Update README.md * Update README.md * OSv2: Add fixes. Increase version for release * OSv2: Add fixes. Increase version for release. Add note to README * Re phrase Splunk character limitation * Hide metrics sheets Change sheets hidden property to true in order to make only the dashboard sheet visible. As there is a sheet per metric / indicator, it was hard to find the actual dashboard. * Enhance RAML spec, Features Backlog items 21, 22, 23, 24 and 25 * Add models for elk, am and mongodb as loaders options. Fix file name * fix to aggregate API manager payload when # of contracts is greater than value defined in vars.apisTotalObtained * Externalize offset into props file. Fix agg transform. * Externalize APIM offset using a var, set at beginning as other commons * This is the new einstein feature * Updated reference to tableau output dir in loader to align poller and API approachees. Updated postman collection to align table request with Splunk request * Added accept header to analytics API query to ensure JSON response * Update api.xml Add missing ">" after manually merging conflicts * Add call to 'common-set-collector-vars-from-properties-api-manager' from missing post platform metrics, business metrics and poller.xml * Update api.xml Fix indentation * Merge auth feature and some fixes into develop (#1) # Features **Separate Anypoint Headers from API Auth** - api.raml: moved anypoint headers to Anypoint headers trait and removed from securedBy. The headers are the Anypoint Platform securty, NOT necessarily the security for this API. Keeping them out of the Authorization header allows for implementers to use their own security such as OAuth. The Anypoint security must still be provided in addition to any security added by the implementer. - Added feature to allow Base64 or plain text secrets in both secret/password Anypoint headers. **Added properties and loggers for API and Dash** - Added API and Dashboard HTTP values as properties in app-dev.yaml. - Added loggers to dashboard choices for debugging. Added 501-Not Implemented if dashboard is disabled. # Fixes - Fixed api.xml flow names to match api.raml for POST. Auto-generated flow names were different. - Updated latest version of dependencies - api-call-api-platform: Added default empty string to avoid null error when no response code provided. * Updating Unit tests for tableau strategies * Changed references of Accelerator to Toolkit in Tableau dashboard * Updated titles of Splunk dashboards * Issue #109 - Exchange assets Query limit off 250 records * Rebrand * Rebranding README andd RAML files. Updated references of accelerator to toolkit. Also updated refs in postman collection * Done with CoreServicesMetric - usersTotal pagination * Separate the headers into multiple traits. * Separate the headers into multiple traits. * Revert dependencies versions * Fix platform user auth test case. After removing the Basic Auth option, the test case was breaking. 98.45% Code Coverage. * Fix Connected App. Base64 regex reccognize the client secret as Base64 by default, so if sent as plain, fails auth. Remove the option of client-secret as base64 * Remove duplicated header X-ANYPNT-ORG-ID * Adding additional context to required roles for Anypoint User * Rename project and update pom references * Update pom.xml Increment pom version for release * Update pom.xml Incremented pom to next Snapshot version following release 1.8.0 * Fix cannot coerce array as string to object * Increase code coverage, including un tested code added for resolution of Issue #109 * Reverting local pom changes * Update pom.xml Updated pom version for release 1.8.1 * Update pom.xml Increment pom to next snapshot version * Resolving issue 137 - Added X-PLAINTEXT-PASSWORD header as plaintext flag Added a new header X-PLAINTEXT-PASSWORD to act as a flag when a plaintext password is provided to avoid incorrectly decoding from base64 * Update pom.xml Updated pom version for release 1.8.2 * Casing of attributes.headers references Capital casing of references to attributes.headers.<header> resolving as null. Changed to lower case to mitigate * Added base64 encoding to password in embedded dashboard * Update set-client-secret-var.dwl * Update pom.xml Increment pom to next SNAPSHOT version * Wrapped target values in DW expression * Minor Munit updates, and dependency version increases to align with Mule 4.4.0 * Modifying how security policies are identified * Added list of security policies as property to allow for easier customisation * Updated postman collection for usability. - Added markdown documentation in collection description that describes folders and required variables. - Moved requests into categorized folders: Benefits & Platform Metrics for now. - Added prerequest scripts to folders for setting all Anypoint Platform headers from variables - Added url variable for requests, to support multiple environments. * Updated README with new config property for security policiy list * Adding env level details to CSV and JSON loaders * Streamling SFDC metrics loader flow * Added SDLC Metrics for Azure DevOps * Removed extra logging and changed component names * externalized dataweave scripts * Update pom.xml * Update .gitignore * Adding env level metrics to SFDC output * Introduce ability to ignore environments Similar to the ability to ignore organizations, it is useful to be able to specify environments to ignore - this is especially useful when using connected-app-credentials and only granting access to a subset of the environments within an organization * Update .gitignore * Adding MUnits for SFDC analytics * Update README.md * Updating READMEs * Update README.md * Update postman_collection.json * Delete api.raml * Update blank_dataset.csv * Update api-call-coreservices.xml * Extract filter environments transform to DW file * Changing year formatting from yyyy to uuuu to prevent parsing errors * Update pom.xml * Update pom.xml * Simplifying Postman collection Simplified Postman collection to use only Environment vars rather than Global and Environment. Added section to README on Postman collection usage Removed toLowerCase() from pre-request scripts * Update README.md * corrected copy paste error * Update README.md * Update README.md * Changed links to be relative * Added secure properties list to mule-artifact.json * Updated HTTP ELK Request Config to use defined property * Fix for incorrect variable rawData The variable rawData was set in the same Transform Message component as the variable loaderDetails, on which the DataWeave for rawData depends. Thus vars.rawData was not set correctly. * Adding version to the Splunk forms according Splunk 9.0.0 specifications on https://docs.splunk.com/Documentation/Splunk/9.0.0/Viz/DashboardjQuery * #195 Excluded secure property files from index * Release 1.9.1 * Release 1.9.1 (#197) * Done with CoreServicesMetric - usersTotal pagination * Added SDLC Metrics for Azure DevOps * Removed extra logging and changed component names * externalized dataweave scripts * Update pom.xml * Simplifying Postman collection Simplified Postman collection to use only Environment vars rather than Global and Environment. Added section to README on Postman collection usage Removed toLowerCase() from pre-request scripts * Update README.md * corrected copy paste error * Update README.md * Update README.md * Changed links to be relative * Added secure properties list to mule-artifact.json * Updated HTTP ELK Request Config to use defined property * Fix for incorrect variable rawData The variable rawData was set in the same Transform Message component as the variable loaderDetails, on which the DataWeave for rawData depends. Thus vars.rawData was not set correctly. * Adding version to the Splunk forms according Splunk 9.0.0 specifications on https://docs.splunk.com/Documentation/Splunk/9.0.0/Viz/DashboardjQuery * #195 Excluded secure property files from index * Release 1.9.1 Co-authored-by: Andres Alleva <andres.alleva@gmail.com> Co-authored-by: Scott Ratliff <scott.ratliff@mulesoft.com> Co-authored-by: richardmckinley <58299919+richardmckinley@users.noreply.github.com> Co-authored-by: Alberici <92322091+angelalbericisfdc@users.noreply.github.com> Co-authored-by: Rodrigo Fuentes <rodrigojfuentes@gmail.com> Co-authored-by: Victor Moreno <vmoreno@mulesoft.com> Co-authored-by: Christina Bauer <christina.bauer@mulesoft.com> Co-authored-by: George Kroon <info@george-kroon.nl> * Increment version * Add code check to run unit tests * Increment version * Remove sensitive data * Revert POM version * MCP Server MVP (#231) * Added MCP documentation. Refactor documentation to include /docs folder and moving existing docs under it. * Add MCP Support for Metrics Toolkit. Implement getAvailableCollectors and getCapabilities. Add MUnit tests for both. * Implement getPlatformMetricsByCollector. Make amq collector to work with Connected Apps (this is not MCP related). * Implement MCP Exchange collector * Implement MCP Design Center and Api Manager collector * Implement Test MCP Arm, Core. RTF is dummy * Add support for MCP tool getPlatformMetricsByKey * Update README to capture requirement for Mule 4.9.3 as minimum version to support MCP * Update postman collection to include MCP support * Update runtime version to make it compatible with min mule version * Refactor listener and server for MCP. Move to Global.xml * Externalize most of Dataweave transformations into files * Replace Agent by Server terminology * Update mcp connector version to GA version --------- Co-authored-by: panizzag <gpanizza@salesforce.com> --------- Co-authored-by: olamiral-mulesoft <olamiral@mulesoft.com> Co-authored-by: David Cisneros <cisneros.david@gmail.com> Co-authored-by: jmelamed <melamedjoel@gmail.com> Co-authored-by: Elyes Jouini <joax87@gmail.com> Co-authored-by: vs193928 <vikas.sharma@mulesoft.com> Co-authored-by: gozdy <gonzalo.ozdy@mulesoft.com> Co-authored-by: rafa <rafa@mulesoft> Co-authored-by: rpavek <rpavek@mulesoft.com> Co-authored-by: Damian Calabresi <damiancalabresi@gmail.com> Co-authored-by: Qamar Ahmed <qahmed@qahmed-ltm5s52.internal.salesforce.com> Co-authored-by: Richard McKinley <richard.mckinley@mulesoft.com> Co-authored-by: titans-of-code <53096698+titans-of-code@users.noreply.github.com> Co-authored-by: richardmckinley <58299919+richardmckinley@users.noreply.github.com> Co-authored-by: Andres Alleva <andres.alleva@gmail.com> Co-authored-by: Charles Young <charles.young@mulesoft.com> Co-authored-by: Scott Ratliff <scott.ratliff@mulesoft.com> Co-authored-by: Chris Hughes <Chris.Hughes1@test-and-trace.nhs.uk> Co-authored-by: Chris Hughes <cajhughes@users.noreply.github.com> Co-authored-by: Alberici <92322091+angelalbericisfdc@users.noreply.github.com> Co-authored-by: Rodrigo Fuentes <rodrigojfuentes@gmail.com> Co-authored-by: Victor Moreno <vmoreno@mulesoft.com> Co-authored-by: Christina Bauer <christina.bauer@mulesoft.com> Co-authored-by: George Kroon <info@george-kroon.nl> Co-authored-by: muleysteve <30406388+muleysteve@users.noreply.github.com> Co-authored-by: Steve Roberts <steve.roberts@mulesoft.com> Co-authored-by: panizzag <gpanizza@salesforce.com>
1 parent 1d011d7 commit c4522f9

File tree

75 files changed

+3412
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+3412
-90
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Splunk | Total Number of Splunk dashboards
217217
## Installation
218218

219219
### Requirements
220-
- Mule Runtime 4.2.2 or above
220+
- Mule Runtime 4.9.3 or above
221221
- All deployments models are supported: CloudHub, OnPrem hosted Runtimes, Runtime Fabric
222222
- Anypoint Platform credentials - Two options are supported:
223223
- Anypoint Platform user with the Organization Administrator role, and CloudHub Admin role (or specific permissions - see connected app section). Both roles should be provided in the Master and all Sub Orgs for which you wish to gather data. The CloudHub Admin role is environment specific - therefore should be granted for each environment in each business group.
@@ -445,7 +445,7 @@ Using the `sfdc` loader option, and initialising Salesforce Analytics Studio wit
445445
5. Create a new data recipe, setting your new dataset as the source. Transform "value" from a dimension to a measure.
446446
6. (Optional) - Filter out the non-numeric value fields (API Manager Policies Used and CloudHub Runtime Versions Used) and store this in a new 'enum' dataset
447447
7. (Optional) - Create a 'historic' dataset. Add a step to your data recipe to append to this historic dataset
448-
More detailed steps can be found in the [SFDC specific README](README_sfdc.md).
448+
More detailed steps can be found in the [SFDC specific README](/docs/README_sfdc.md).
449449

450450
**Note:** This is only a high level introduction and it is highly recommended that you become familiar with Tableau CRM through official documentation.
451451

@@ -575,6 +575,10 @@ How to link business needs, measurements and data sources?
575575
#### Detailed
576576
![Implementation Approach](/img/implementation_approach.png)
577577

578+
### MCP Support
579+
Starting version 2.0.0, the Metrics Toolkit introduces MCP support to facilitate the discovery and usage of the Toolkit in agentic architectures. Please see ![MCP Server](/docs/MCP_SUPPORT.md) doc for more details
580+
581+
578582
## Final Notes
579583
Enjoy and provide feedback / contribute :)
580584

docs/MCP_SUPPORT.md

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
## MCP Server Support
2+
---
3+
4+
> **Disclaimer:** MCP Support requires Mule 9.6+.
5+
6+
MCP Server Structure based on the RAML specification of the Metrics Toolkit API. The focus is on **granularity**, **performance**, and **agent-readiness**, breaking down the heavy endpoints into finer-grained, composable tools for MCP Agents.
7+
8+
Complete MCP Spec can be found here. As a high level summary, MCP tools conform to the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification).
9+
10+
**NOTE**: The initial implementation of the MCP support will cover the (GET) endpoints of the platform metrics. Benefits and POST endpoints to load data will be added in future.
11+
12+
### Available MCP Server Tools
13+
14+
1. [`getCapabilities`](###getcapabilities)
15+
2. [`getAvailableCollectors`](###getavailablecollectors)
16+
3. [`getPlatformMetricsByCollector`](###getplatformmetricsbycollector)
17+
4. [`getPlatformMetricByKey`](###getplatformmetricbykey)
18+
19+
#### getCapabilities
20+
21+
> **Disclaimer:** This tool may be replaced in future versions by native support for the [Google A2A Protocol](https://github.com/google/a2a/blob/main/spec.md), which standardizes agent capability declarations and execution formats.
22+
23+
| Field | Details |
24+
|------------------------|------------------------------------------------------------------------------------------------------|
25+
| Method | getCapabilities |
26+
| Type | For Agent Discovery Purposes|
27+
| Summary | Returns a machine-readable summary of the metrics toolkit MCP capabilities, including available tools, parameters, and usage hints. |
28+
| Inputs (`params`) | None |
29+
| Output (`result`) | Array of tool metadata objects, each describing one available method and useful info to respond to general FAQ |
30+
| Performance Guidance | Lightweight. Recommended for initialization, Agent planning (ReAct patterns), or UI rendering of available actions.|
31+
| Agent Use Case | Enables dynamic planning and tool discovery at runtime. Useful for self-configuring or ReAct-style agents. |
32+
33+
###### JSON-RPC Request Example
34+
35+
```json
36+
{
37+
"jsonrpc": "2.0",
38+
"id": {uuuid},
39+
"method": "tools/call",
40+
"params": {
41+
"name": "getCapabilities",
42+
"arguments": {
43+
}
44+
}
45+
}
46+
```
47+
48+
###### Response Example
49+
50+
```json
51+
{
52+
"jsonrpc": "2.0",
53+
"result": {
54+
"description": "This capability manifest describes the tools (methods) exposed by this server. Each tool includes a name, description, and an input schema that defines the parameters required to invoke it. Agents can use this manifest to dynamically plan their next actions without hardcoding tool knowledge. The tools listed here follow the JSON-RPC 2.0 specification and must be invoked via POST requests to the MCP endpoint. Agents should first inspect this manifest to determine which tools are available and how to use them, then construct a valid request matching the tool’s input schema.",
55+
"tools": [
56+
{
57+
"name": "getAvailableCollectors",
58+
"description": "Returns all collector identifiers supported by the server.",
59+
"inputSchema": {
60+
"type": "object",
61+
"properties": {}
62+
}
63+
},
64+
{
65+
"name": "getPlatformMetricsByCollector",
66+
"description": "Retrieves metrics from a specific Anypoint collector with optional filters",
67+
"inputSchema": {
68+
"type": "object",
69+
"properties": {
70+
"collectorId": { "type": "string" },
71+
"bg": { "type": "string" },
72+
"filters": {
73+
"type": "object",
74+
"properties": {
75+
"environment": { "type": "string" },
76+
"region": { "type": "string" }
77+
}
78+
}
79+
},
80+
"required": ["collectorId", "bg"]
81+
}
82+
},
83+
{
84+
"name": "getPlatformMetricByKey",
85+
"description": "Fetches a single metric value by key and collector. Useful for atomic, low-latency reads.",
86+
"inputSchema": {
87+
"type": "object",
88+
"properties": {
89+
"collector": { "type": "string" },
90+
"metricKey": { "type": "string" },
91+
"bg": { "type": "string" },
92+
"environment": { "type": "string" }
93+
},
94+
"required": ["collector", "metricKey", "bg"]
95+
}
96+
}
97+
]
98+
},
99+
"id": {uuuid}
100+
}
101+
```
102+
103+
#### getAvailableCollectors
104+
105+
| Field | Details |
106+
|------------------------|------------------------------------------------------------------------------------------------------|
107+
| Method | getAvailableCollectors |
108+
| Type | DiscoveryTool |
109+
| Summary | Lists all available collector IDs used to retrieve platform metrics. |
110+
| Inputs (`params`) | None |
111+
| Output (`result`) | array<string> of collector identifiers |
112+
| Performance Guidance | Lightweight, cacheable, suitable for prefetch or UI support. |
113+
| Agent Use Case | Agent dynamically determines what collector IDs are supported in the org. |
114+
115+
##### JSON-RPC Request Example
116+
117+
```json
118+
POST /mcp
119+
Content-Type: application/json
120+
{
121+
"jsonrpc": "2.0",
122+
"method": "tools/call",
123+
"params": {
124+
"name": "getAvailableCollectors",
125+
"arguments": {
126+
}
127+
},
128+
"id": {uuuid},
129+
}
130+
```
131+
132+
##### Response Example
133+
134+
```json
135+
{
136+
"jsonrpc":"2.0",
137+
"id": {uuid},
138+
"result":{
139+
"content":[
140+
{
141+
"type":"text",
142+
"audience":[],
143+
"text": "[\"arm\",\"ch\",\"apma\",\"ex\",\"core\",\"dc\",\"rtf\",\"amq\",\"osv2\"]"
144+
}],
145+
"isError":false
146+
}
147+
}
148+
```
149+
150+
#### getPlatformMetricsByCollector
151+
152+
| Field | Details |
153+
|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
154+
| Method | getPlatformMetricsByCollector |
155+
| Type | QueryTool |
156+
| Summary | Retrieves platform metrics for a specific collector. |
157+
| Inputs (`params`) | - `collectorId` (string, required). Any of `getAvailableCollectors`|
158+
| Output (`result`) | JSON result with the collected metrics for the given collector |
159+
| Performance Guidance | Require collectorId. Multiple collectors cannot be used to avoid delayed answers to the calling agent |
160+
| Agent Use Cases | ITops support Agent monitors apps health, licensing Agent to support during renewals |
161+
162+
##### JSON-RPC Request Example
163+
164+
```json
165+
POST /mcp
166+
Content-Type: application/json
167+
168+
{
169+
"jsonrpc": "2.0",
170+
"id": {uuid},
171+
"method": "tools/call",
172+
"params": {
173+
"name": "getPlatformMetricsByCollector",
174+
"arguments": {
175+
"collector": "ch",
176+
"bg": {orgId}
177+
}
178+
}
179+
}
180+
```
181+
182+
##### Response Example
183+
184+
```json
185+
{
186+
"jsonrpc": "2.0",
187+
"id": {uuid},
188+
"result": {
189+
"content": [
190+
{
191+
"type": "text",
192+
"audience": [
193+
194+
],
195+
"text": "[\n {\n \"businessGroup\": \"Fantasy Company\",\n \"businessGroupId\": \"{orgId}\" ... ]"
196+
}
197+
],
198+
"isError": false
199+
}
200+
}
201+
```
202+
#### getPlatformMetricByKey
203+
204+
| Field | Details |
205+
|------------------------|---------------------------------------------------------------------------------------------------|
206+
| Method | getPlatformMetricByKey |
207+
| Type | QueryTool |
208+
| Summary | Fetches a single platform metric value by key. It supports keys containing multiple child keys e.g. networking will return all the networking config for ch collector|
209+
| Inputs (`params`) | `collector` (string, required), `bg` (string, required), metricKey` (string, required)
210+
| Output (`result`) | JSON response with metric value |
211+
| Performance Guidance | Optimized for low-latency, atomic metric retrieval. |
212+
| Agent Use Case | Alerting agent reads one key for rapid decision making. |
213+
214+
##### JSON-RPC Request Example
215+
216+
```json
217+
{
218+
"jsonrpc": "2.0",
219+
"id": {uuid},
220+
"method": "tools/call",
221+
"params": {
222+
"name": "getPlatformMetricsByKey",
223+
"arguments": {
224+
"collector": "ch",
225+
"bg": {orgId},
226+
"metricKey": "networking"
227+
}
228+
}
229+
}
230+
```
231+
232+
##### Response Example
233+
234+
```json
235+
{
236+
"jsonrpc":"2.0",
237+
"id": {uuid},
238+
"result":{
239+
"content":[
240+
{
241+
"type":"text",
242+
"audience":[],
243+
"text": "[{\"businessGroup\": ... "
244+
}],
245+
"isError":false
246+
}
247+
}
248+
```
File renamed without changes.

mule-artifact.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"minMuleVersion": "4.6.0",
2+
"minMuleVersion": "4.9.3",
33
"javaSpecificationVersions": ["17"],
44
"secureProperties": [
55
"auth.orgId",

pom.xml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.mulesoft</groupId>
66
<artifactId>metrics-toolkit</artifactId>
7-
<version>1.10.0</version>
7+
<version>2.0.0</version>
88
<packaging>mule-application</packaging>
99

1010
<name>metrics-toolkit</name>
@@ -13,10 +13,10 @@
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1414
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1515

16-
<app.runtime>4.8.0</app.runtime>
16+
<app.runtime>4.9.3</app.runtime>
1717
<mule.maven.plugin.version>4.4.0</mule.maven.plugin.version>
1818
<!-- MUnit Dependencies versions -->
19-
<munit.runtime>4.8.0</munit.runtime>
19+
<munit.runtime>4.9.3</munit.runtime>
2020
<munit.version>3.4.0</munit.version>
2121
<munit-runner.version>3.4.0</munit-runner.version>
2222
<munit-tools.version>3.4.0</munit-tools.version>
@@ -32,7 +32,8 @@
3232
<mule-mongodb-connector.version>6.3.10</mule-mongodb-connector.version>
3333
<mongodb-driver-legacy.version>4.0.4</mongodb-driver-legacy.version>
3434
<validation-module.version>2.0.7</validation-module.version>
35-
<assertions.version>1.0.2</assertions.version>
35+
<assertions.version>1.0.2</assertions.version>
36+
<mcp.version>1.1.0</mcp.version>
3637
</properties>
3738

3839
<build>
@@ -194,6 +195,12 @@
194195
<version>${analytics.version}</version>
195196
<classifier>mule-plugin</classifier>
196197
</dependency>
198+
<dependency>
199+
<groupId>com.mulesoft.connector</groupId>
200+
<artifactId>mule-mcp-connector</artifactId>
201+
<version>${mcp.version}</version>
202+
<classifier>mule-plugin</classifier>
203+
</dependency>
197204
</dependencies>
198205

199206
<repositories>

0 commit comments

Comments
 (0)