Generate a regular expression that passes your examples
regex_generateA regular expression from a description, with examples that must match and examples that must not. The pattern is returned only when every example passes when tested in the service (one retry with the failures). Patterns with nested quantifiers are refused to avoid catastrophic backtracking. Examples are up to 10 strings of 300 characters each. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"description": "<description>",
"matches": "<matches>"
},
"name": "regex_generate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matches | Yes | Strings the pattern must match (1-10 items, each max 300 characters) | |
| nonMatches | No | Strings the pattern must not match (0-10 items, each max 300 characters) | |
| description | Yes | What the pattern should match, in plain words (max 500 characters) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| flags | No | ||
| tests | No | ||
| pattern | No | ||
| checkedAt | No | ||
| explanation | No |