GovernFilters
Filters with an agent
Create retain and destroy filters from the Core MCP.
Each operation is an effect, retain or destroy, and a dot-path regex. defaultFilterOperation is retain unless set to destroy. Filters run on 2xx JSON responses in this order: target credential, target, inbound credential, proxy.
Call get_guide with guide_key: "filter-creation" before the first create.
Call order
- Call
create_proxy_filter.- Required:
clientId,proxyId,filterActive,operations. - Optional:
defaultFilterOperation,priority,notes,methods,requestPath,headers,query,body,token,responseHeaders,responseBody,responseStatus,variables,alerts.
- Required:
- Keep the returned filter
sKey. - Call
get_proxy_filter(clientId, proxyId, filterId)to verify it.
list_proxy_filters requires clientId and proxyId. update_proxy_filter also requires filterId; other fields are optional. Credential equivalents are list_credential_filters, get_credential_filter, create_credential_filter, and update_credential_filter.
Example
{
"tool": "create_proxy_filter",
"arguments": {
"clientId": "b3a1c7d2-5e44-4f0a-9c1e-7d2f8a6b1c90",
"proxyId": "5d8a1c30-4e72-4b19-8f6a-0c3d9e7b1a25",
"filterActive": true,
"operations": [
{
"effect": "destroy",
"jsonPath": { "pattern": "^password$" }
}
]
}
}For { "id": 42, "password": "secret" }, the caller receives { "id": 42 }.