Skip to content

Commit 99cd3f8

Browse files
committed
fix(tools): describe how error message conditions match
1 parent 8c7a1af commit 99cd3f8

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/mcp-core/src/skillDefinitions.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@
535535
},
536536
{
537537
"name": "create_custom_inbound_filter",
538-
"description": "Create a custom inbound filter that drops matching errors, logs, metrics or spans at ingest, before they are stored or count against quota.\n\nUse this tool when the user wants to:\n- Ignore or filter out errors by message or exception type ('stop ingesting *ConnectionError*')\n- Drop events from an IP address or CIDR range, or from a release ('block 10.0.0.0/8', 'ignore release 1.4.*')\n- Drop noisy logs by message, or metrics by name\n- Filter every data type at once with dataType='all' on release or IP address\n\nConditions are ANDed; the values inside a condition are ORed. To express 'A or B' put both patterns into one condition's value list. To express 'A and B' use two conditions.\n\nBe careful when using this tool! An active filter drops data irreversibly. Create it with active=false to review it first.\n\n<examples>\n### Ignore one exception type on errors\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Ignore flaky connection errors', dataType='error', conditions=[{type: 'error_type', value: ['ConnectionError', 'TimeoutError']}])\n\n### Drop everything from an IP range for one release\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Load test traffic', dataType='all', conditions=[{type: 'ip_address', value: ['10.0.0.0/8']}, {type: 'release', value: ['my-app@2.1.*']}])\n\n### Drop debug logs\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Drop debug logs', dataType='log', conditions=[{type: 'log_message', value: ['*DEBUG*']}])\n</examples>\n\n<hints>\n- Error message conditions match `{exception.type}: {exception.value}` on error events and the formatted message on message events. Prefer wildcards such as `*ConnectionError*` over a full message.\n- Release conditions match the full release name, e.g. `my-app@1.4.0`; use globs such as `my-app@1.*` for a range.\n- Use find_custom_inbound_filters() first to avoid creating a duplicate.\n</hints>",
538+
"description": "Create a custom inbound filter that drops matching errors, logs, metrics or spans at ingest, before they are stored or count against quota.\n\nUse this tool when the user wants to:\n- Ignore or filter out errors by message or exception type ('stop ingesting *ConnectionError*')\n- Drop events from an IP address or CIDR range, or from a release ('block 10.0.0.0/8', 'ignore release 1.4.*')\n- Drop noisy logs by message, or metrics by name\n- Filter every data type at once with dataType='all' on release or IP address\n\nConditions are ANDed; the values inside a condition are ORed. To express 'A or B' put both patterns into one condition's value list. To express 'A and B' use two conditions.\n\nBe careful when using this tool! An active filter drops data irreversibly. Create it with active=false to review it first.\n\n<examples>\n### Ignore one exception type on errors\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Ignore flaky connection errors', dataType='error', conditions=[{type: 'error_type', value: ['ConnectionError', 'TimeoutError']}])\n\n### Drop everything from an IP range for one release\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Load test traffic', dataType='all', conditions=[{type: 'ip_address', value: ['10.0.0.0/8']}, {type: 'release', value: ['my-app@2.1.*']}])\n\n### Drop debug logs\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Drop debug logs', dataType='log', conditions=[{type: 'log_message', value: ['*DEBUG*']}])\n</examples>\n\n<hints>\n- Error message conditions match the exception type, the exception value and the formatted message of an event, each on its own. Prefer wildcards such as `*ConnectionError*` over a full message.\n- Release conditions match the full release name, e.g. `my-app@1.4.0`; use globs such as `my-app@1.*` for a range.\n- Use find_custom_inbound_filters() first to avoid creating a duplicate.\n</hints>",
539539
"requiredScopes": ["project:write"]
540540
},
541541
{

‎packages/mcp-core/src/toolDefinitions.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@
578578
},
579579
{
580580
"name": "create_custom_inbound_filter",
581-
"description": "Create a custom inbound filter that drops matching errors, logs, metrics or spans at ingest, before they are stored or count against quota.\n\nUse this tool when the user wants to:\n- Ignore or filter out errors by message or exception type ('stop ingesting *ConnectionError*')\n- Drop events from an IP address or CIDR range, or from a release ('block 10.0.0.0/8', 'ignore release 1.4.*')\n- Drop noisy logs by message, or metrics by name\n- Filter every data type at once with dataType='all' on release or IP address\n\nConditions are ANDed; the values inside a condition are ORed. To express 'A or B' put both patterns into one condition's value list. To express 'A and B' use two conditions.\n\nBe careful when using this tool! An active filter drops data irreversibly. Create it with active=false to review it first.\n\n<examples>\n### Ignore one exception type on errors\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Ignore flaky connection errors', dataType='error', conditions=[{type: 'error_type', value: ['ConnectionError', 'TimeoutError']}])\n\n### Drop everything from an IP range for one release\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Load test traffic', dataType='all', conditions=[{type: 'ip_address', value: ['10.0.0.0/8']}, {type: 'release', value: ['my-app@2.1.*']}])\n\n### Drop debug logs\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Drop debug logs', dataType='log', conditions=[{type: 'log_message', value: ['*DEBUG*']}])\n</examples>\n\n<hints>\n- Error message conditions match `{exception.type}: {exception.value}` on error events and the formatted message on message events. Prefer wildcards such as `*ConnectionError*` over a full message.\n- Release conditions match the full release name, e.g. `my-app@1.4.0`; use globs such as `my-app@1.*` for a range.\n- Use find_custom_inbound_filters() first to avoid creating a duplicate.\n</hints>",
581+
"description": "Create a custom inbound filter that drops matching errors, logs, metrics or spans at ingest, before they are stored or count against quota.\n\nUse this tool when the user wants to:\n- Ignore or filter out errors by message or exception type ('stop ingesting *ConnectionError*')\n- Drop events from an IP address or CIDR range, or from a release ('block 10.0.0.0/8', 'ignore release 1.4.*')\n- Drop noisy logs by message, or metrics by name\n- Filter every data type at once with dataType='all' on release or IP address\n\nConditions are ANDed; the values inside a condition are ORed. To express 'A or B' put both patterns into one condition's value list. To express 'A and B' use two conditions.\n\nBe careful when using this tool! An active filter drops data irreversibly. Create it with active=false to review it first.\n\n<examples>\n### Ignore one exception type on errors\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Ignore flaky connection errors', dataType='error', conditions=[{type: 'error_type', value: ['ConnectionError', 'TimeoutError']}])\n\n### Drop everything from an IP range for one release\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Load test traffic', dataType='all', conditions=[{type: 'ip_address', value: ['10.0.0.0/8']}, {type: 'release', value: ['my-app@2.1.*']}])\n\n### Drop debug logs\ncreate_custom_inbound_filter(organizationSlug='my-org', projectSlug='my-project', name='Drop debug logs', dataType='log', conditions=[{type: 'log_message', value: ['*DEBUG*']}])\n</examples>\n\n<hints>\n- Error message conditions match the exception type, the exception value and the formatted message of an event, each on its own. Prefer wildcards such as `*ConnectionError*` over a full message.\n- Release conditions match the full release name, e.g. `my-app@1.4.0`; use globs such as `my-app@1.*` for a range.\n- Use find_custom_inbound_filters() first to avoid creating a duplicate.\n</hints>",
582582
"inputSchema": {
583583
"type": "object",
584584
"properties": {

‎packages/mcp-core/src/tools/catalog/create-custom-inbound-filter.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default defineTool({
5252
"</examples>",
5353
"",
5454
"<hints>",
55-
"- Error message conditions match `{exception.type}: {exception.value}` on error events and the formatted message on message events. Prefer wildcards such as `*ConnectionError*` over a full message.",
55+
"- Error message conditions match the exception type, the exception value and the formatted message of an event, each on its own. Prefer wildcards such as `*ConnectionError*` over a full message.",
5656
"- Release conditions match the full release name, e.g. `my-app@1.4.0`; use globs such as `my-app@1.*` for a range.",
5757
"- Use find_custom_inbound_filters() first to avoid creating a duplicate.",
5858
"</hints>",

0 commit comments

Comments
 (0)