Apply, list, or edit provider-native policies on API instances (Kong plugin, Apigee template, Azure policy, or MuleSoft/Anypoint) via the MuleSoft Platform MCP Server. TRIGGER when: the user asks what protection they have on a provider's APIs ("what protection do I have for my Apigee APIs"), wants to change an already-applied native policy ("improve the IP filtering to include 1.1.1.1"), or apply one native plugin to an already-chosen instance ("add ip-restriction on this Kong service"). DO NOT TRIGGER when: they want one Universal/canonical policy across many instances or providers — use skill apply-universal-policy. DO NOT TRIGGER to remove, detach, enable, or disable a policy, or when they are driving Anypoint REST (skill apply-policy-to-api-instance).
77
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
List what is already applied, change it, or apply one native plugin to one instance — then wait until the write has actually finished.
Use this skill when the user asks to:
Trigger keywords: what protection · what's applied · change this policy · IP filtering · this instance · Kong plugin · Apigee · Azure · native policy.
Do NOT use this skill when:
apply_universal_policy)urn:api:*), not MCP →
skill apply-policy-to-api-instanceConnected to urn:mcp:mulesoft-platform. Probe with
view_api_instance_policies or prepare_policy_creation. If the tools are
missing, stop. On 403 / gate-closed (enabled: false), say they are not
entitled and stop — never silently switch provider.
references/native-apply.md — provider routing, find_assets join,
edit merge, Apigee rename rule, and how to wait for completion. Read it
before the first write.Read the latest user turn and choose one path. Do not run Apply steps for an Audit or Edit request.
| Path | When | Go to |
|---|---|---|
| Audit | "What protection / what's applied" with no change yet | Step A |
| Edit | Change an already-applied native policy ("add 1.1.1.1") | Step E |
| Apply | Add a native plugin that is not already on this instance | Steps 1–5 |
apply_universal_policy.configuration_data from
get_policy_template_form (template.configuration). Apigee uses nested
objects and @-prefixed attributes — copy those names.status: "success"
with httpStatus 202 / operationStatus=accepted. That is acceptance,
not done. Poll list_instance_policy_operations. MuleSoft writes are
typically synchronous (2xx without operationStatus).Skip Apply. Do not pass policy_name_filter. Do not offer to apply
a Universal policy unless they ask.
This is the "what protection do I have for my Apigee APIs?" path: they may name a provider slice (several APIs), not a single instance.
find_assets with include_applied_policies=true, asset_type=api,
user_query verbatim. Put a named provider in query, then filter
client-side (references/native-apply.md).Example shape:
Payments API
prod (Production · apigee)
- Access control (inbound, enabled)
sandbox (Sandbox · apigee)
- (none)Skip Apply unless you still need the instance list from Step A.
There is no bulk-edit tool: loop once per instance. Several Apigee APIs
with the same native policy is still one edit_applied_policy each.
api_instance_id + policy_id + Exchange
asset.{group_id,asset_id,asset_version} + provider (and
environment_id on MuleSoft) from view_api_instance_policies
(do not guess). Skip readOnly: true — say so and stop for those.get_policy_template_form using those coordinates.configurationData. Merge the requested delta into that
full object (configuration_data replaces wholesale — omitted keys are
dropped). Prompt only for required fields the merge left empty.@name / display name on an existing policy.
Edit configuration values only. A rename makes the async UPDATE fail
(BAD_REQUEST) even though the tool reported success on the 202.edit_applied_policy per instance. Then wait
(references/native-apply.md). Confirm per API instance.If the user already named an instance, use that api_instance_id (and
environment_id for MuleSoft). Otherwise find_assets (asset_type=api,
user_query verbatim) and pick one. If several remain, list them
(API name · instance · environment · provider) and wait.
Resolve provider: kong / apigee / azure for external; omit (or
mulesoft) for Anypoint. Do not guess.
Do not silently apply a new native plugin to a set — that fan-out is skill apply-universal-policy (canonical) or a confirmed Edit loop (already applied).
Call prepare_policy_creation with organization_id, api_instance_id,
provider (external), and policy_name_hint when they named a policy.
MuleSoft also needs environment_id.
Each entry carries Exchange coordinates (groupId / assetId /
assetVersion) plus capabilities.injectionPoints and applicationLimit
(MULTIPLE = the same template may be applied more than once). Applied
policies are filtered out (alreadyApplied is always false here).
If more than one template matches the hint, list names and ask. If none
match, say so and stop.
Call get_policy_template_form with the selected template's Exchange
coordinates (group_id, asset_id, asset_version — required on the
external path) plus provider / environment_id as in Step 2.
Present the schema table. [GATE] Wait for the whole config in one reply, then for okay to apply.
Call apply_policy_to_instance once with:
api_instance_idconfiguration_data — the collected object (schema property names, not
guessed ones)asset.{group_id,asset_id,asset_version} from Step 2 (required external)provider for Kong / Apigee / Azureenvironment_id for MuleSoftinjection_point only if the template requires it and the user set it;
otherwise omit and let APIM default itDo not loop this tool. Do not call apply_universal_policy.
See references/native-apply.md. Report the native policy name → API
instances (environment / provider). On FAILED, say whether
error.retryable is present. Optionally re-read
view_api_instance_policies so the user sees the live policyId and
config.
prepare_policy_creation /
apply because the file is numbered 1–5. ❌ sending a Kong plugin to
apply_universal_policy.status: "success" + HTTP 202 as done — poll
list_instance_policy_operations.policy_id / asset
from view_api_instance_policies; config keys from
get_policy_template_form. ❌ inventing Apigee @-prefixed fields or
changing @name on edit.Tools missing: the Platform MCP catalog on this host is stale. Stop. Do not fall back to Anypoint REST unless the user is on skill apply-policy-to-api-instance.
Gate closed / 403: say they are not entitled for that provider. Stop.
Apply of a new plugin to more than one instance: ask which one, or switch to skill apply-universal-policy if they meant a canonical template.
httpStatus 422 on apply/edit: configuration_data does not match the
provider schema. Re-read get_policy_template_form and use its exact
property names.
Apigee edit failed after a 202 success: you likely changed
AccessControl.@name (or the equivalent display name). Keep @name
identical to the applied value; delete-and-recreate is not on this surface.
User named a Universal/canonical template for many APIs: switch to skill apply-universal-policy.
apply_universal_policy).urn:api:*), not MCP.4cf0cf6
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.