---
title: "fswa_mcp_expose_writes — Filter Hook"
description: "Controls whether write abilities are exposed to AI agents over the Abilities API and MCP."
url: "https://wpwebhooks.org/docs/fswa-mcp-expose-writes/"
---

[WP Webhooks](https://wpwebhooks.org/) / [Docs](https://wpwebhooks.org/docs/) / fswa\_mcp\_expose\_writes

Filter since v2.9.0

# fswa\_mcp\_expose\_writes

Controls whether write abilities are exposed to AI agents over the Abilities API and MCP.

/ Signature

```
apply_filters( 'fswa_mcp_expose_writes', $enabled )
```

/ When it fires

Fires when the plugin decides whether write-scoped abilities (create, update, enable or delete webhooks, snippets, rules) are available on the Abilities/MCP surface. Build with AI inside wp-admin does not go through the Abilities API and is not affected.

/ Parameters

| Name | In | Type | Req | Description |
| --- | --- | --- | --- | --- |
| $enabled | param | bool | yes | Whether write-scoped abilities are exposed. Defaults to the plugin's own setting, which is on by default. |

/ Returns

`bool` \`false\` holds every connected agent to read abilities.

/ Examples

Read-only agents on production

```
add_filter( 'fswa_mcp_expose_writes', function ( $enabled ) {
    return wp_get_environment_type() === 'production' ? false : $enabled;
} );
```

/ Related

[fswa\_ability\_permitted](https://wpwebhooks.org/docs/fswa-ability-permitted/)[fswa\_ability\_definitions](https://wpwebhooks.org/docs/fswa-ability-definitions/)[API Tokens](https://wpwebhooks.org/docs/api-tokens/)

/Ready

## Your next automation is  
one sentence away.

[Try the Live Preview](https://playground.wordpress.net/?blueprint-url=https://wpwebhooks.org/blueprint.json) [See the Plugin →](https://wpwebhooks.org/wordpress-webhook-plugin/)

$ wp plugin install flowsystems-webhook-actions --activate

## Structured data

```json
{"@context":"https://schema.org","@type":"TechArticle","name":"fswa_mcp_expose_writes — Filter Hook — Webhook Actions Docs","description":"Controls whether write abilities are exposed to AI agents over the Abilities API and MCP.","url":"https://wpwebhooks.org/docs/fswa-mcp-expose-writes/","isPartOf":{"@type":"WebSite","name":"WP Webhooks","url":"https://wpwebhooks.org"},"about":{"@type":"SoftwareApplication","name":"Webhook Actions","applicationCategory":"WordPress Plugin"}}
```
