Skip to main content
Glama

validate_detection

Validate PII detection accuracy by comparing results against expected entities to calculate precision, recall, and F1 scores for testing purposes.

Instructions

Validate PII detection against expected results (useful for testing).

Args:
    text: The text to analyze
    expected_entities: List of expected entities with 'entity_type', 'start', 'end'
    language: Language code (default: "en")

Returns:
    JSON string with validation results including precision, recall, and F1 score

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
expected_entitiesYes
languageNoen

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool's testing-oriented behavior and the return format ('JSON string with validation results including precision, recall, and F1 score'), which is valuable. However, it doesn't mention potential side effects, error conditions, performance characteristics, or authentication needs, leaving gaps for a tool with 3 parameters.

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

Conciseness5/5

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

The description is well-structured and front-loaded: the first sentence states the purpose, followed by clear 'Args:' and 'Returns:' sections. Every sentence earns its place by explaining parameters and output without redundancy. It's appropriately sized for a 3-parameter tool with testing focus.

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 3 parameters with 0% schema coverage and an output schema present, the description does a good job: it explains all parameters and the return value. However, as a validation/testing tool with no annotations, it could benefit from more behavioral context (e.g., error handling, what happens if validation fails). The output schema reduces the need to detail return values, but some gaps remain.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaningful semantics: 'text' is 'The text to analyze', 'expected_entities' is a 'List of expected entities with 'entity_type', 'start', 'end'', and 'language' has a default 'en'. This clarifies purpose and structure beyond the bare schema, though it doesn't detail formats (e.g., what 'entity_type' values are).

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: 'Validate PII detection against expected results (useful for testing).' It specifies the verb ('validate') and resource ('PII detection'), and the parenthetical clarifies it's for testing. However, it doesn't explicitly differentiate from siblings like 'analyze_text' or 'batch_analyze' beyond the validation/testing aspect.

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

Usage Guidelines3/5

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

The description implies usage context with '(useful for testing)', suggesting it's for validation/testing scenarios rather than production analysis. However, it doesn't provide explicit guidance on when to use this vs. alternatives like 'analyze_text' for detection without validation, or mention prerequisites or exclusions.

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/cmalpass/mcp-presidio'

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