Skip to main content
Glama

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spec_idYes
facet_indexYes
parameter_nameYes
base_typeYes
locationNorequirements
lengthNo
min_lengthNo
max_lengthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While it shows the return format and mentions the tool adds restrictions, it doesn't clarify whether this is a mutation operation, what permissions are needed, whether changes are reversible, or any rate limits. The example helps but doesn't cover behavioral traits adequately.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately structured with clear sections (Args, Returns, Example) but contains some redundancy. The first sentence 'Add string length restriction.' is concise, but the example essentially restates the purpose. The parameter explanations are necessary given the poor schema coverage, making the overall length reasonable but not optimally efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (8 parameters, 4 required), 0% schema coverage, and presence of an output schema, the description provides substantial parameter semantics and shows the return format. It covers what the tool does and how to use it, though behavioral aspects like mutation effects and prerequisites are missing. The output schema reduces the need to explain return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates well by explaining all 8 parameters in the Args section with clear meanings (e.g., 'spec_id: Specification identifier or name', 'location: "applicability" or "requirements"'). It provides examples for parameter_name and base_type, and clarifies the relationship between length/min_length/max_length parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Add string length restriction' and provides a concrete example about restricting tag length between 5 and 50 characters. However, it doesn't explicitly differentiate this from sibling tools like 'add_bounds_restriction' or 'add_pattern_restriction', which likely handle different types of restrictions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'add_bounds_restriction' or 'add_pattern_restriction'. It mentions an example about restricting attribute values, but offers no explicit when/when-not instructions or prerequisites for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vinnividivicci/ifc-ids-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server