get_metric
The browser finds one tool on the website. The tool sends one request to the existing API.
User request
How many people signed up this week?
Browser tool call
Code
get_metric({
"metric": "signups",
"period": "this-week"
})OpenAPI setting
JSON
{
"operationId": "get_metric",
"description": "Get one approved product metric for a named period.",
"x-webmcp-enabled": true,
"parameters": [
{
"name": "metric",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"signups",
"activations"
]
}
},
{
"name": "period",
"in": "query",
"required": true,
"schema": {
"type": "string",
"enum": [
"today",
"this-week",
"this-month"
]
}
}
]
}Existing API request
Code
GET /api/metrics/signups?period=this-weekWhy this is a fit
This request only reads data. It uses simple values in the path or query. The website can check the current user’s access before the API returns data.
What stays out
The tool cannot change data. It does not create incidents, change inventory, update tickets, or edit metrics.