add_length_restriction
Define exact, minimum, or maximum character limits for parameters in IDS specifications to enforce data validation rules.
Instructions
Add string length restriction.
Args: spec_id: Specification identifier or name facet_index: Index of facet in location (0-based) parameter_name: Which parameter to restrict (e.g., "value") base_type: XSD base type (e.g., "xs:string") ctx: FastMCP Context (auto-injected) location: "applicability" or "requirements" (default: "requirements") length: Exact length min_length: Minimum length max_length: Maximum length
Returns: {"status": "added", "restriction_type": "length", "spec_id": "S1"}
Example: Add length restriction to attribute value: Tag must be between 5 and 50 characters
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": {
"spec_id": "<spec_id>",
"facet_index": "<facet_index>",
"parameter_name": "<parameter_name>",
"base_type": "<base_type>"
},
"name": "add_length_restriction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec_id | Yes | ||
| facet_index | Yes | ||
| parameter_name | Yes | ||
| base_type | Yes | ||
| location | No | requirements | |
| length | No | ||
| min_length | No | ||
| max_length | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||