Skip to main content
Glama

analyze_text

Detect Personally Identifiable Information (PII) in text to identify sensitive data like names, emails, phone numbers, and addresses for data privacy protection.

Instructions

Analyze text to detect PII entities.

Args:
    text: The text to analyze for PII
    language: Language code (default: "en")
    entities: List of entity types to detect (default: all). Examples: PERSON, EMAIL_ADDRESS, 
             PHONE_NUMBER, CREDIT_CARD, LOCATION, DATE_TIME, etc.
    score_threshold: Minimum confidence score (0.0-1.0) for detection (default: 0.0)
    return_decision_process: Include detailed decision process in results (default: False)

Returns:
    JSON string with detected PII entities including type, location, and confidence score

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
languageNoen
entitiesNo
score_thresholdNo
return_decision_processNo

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 full burden. It discloses key behavioral traits: it performs PII detection (not anonymization), returns JSON with specific fields, and includes optional detailed decision process. However, it doesn't cover rate limits, authentication needs, or error handling, leaving gaps for a mutation-like analysis tool.

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 with clear sections (Args, Returns), front-loaded purpose statement, and every sentence adds value. No redundant information—each parameter explanation is necessary given the 0% schema coverage.

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 5 parameters with 0% schema coverage and no annotations, the description does an excellent job explaining inputs and output format. However, as an analysis tool with potential side effects (e.g., data processing), it could benefit from more behavioral context like performance characteristics or error cases. The output schema existence reduces but doesn't eliminate this need.

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

Parameters5/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 fully. It provides detailed semantics for all 5 parameters: explains 'text' purpose, 'language' default and format, 'entities' examples and default, 'score_threshold' range and default, and 'return_decision_process' effect. This adds substantial value beyond the bare schema.

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

Purpose5/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 with specific verb ('analyze') and resource ('text to detect PII entities'), distinguishing it from siblings like 'anonymize_text' or 'analyze_structured_data'. It explicitly mentions what the tool does beyond just the name.

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 through parameter explanations (e.g., 'entities: List of entity types to detect'), but lacks explicit guidance on when to use this tool versus alternatives like 'batch_analyze' or 'validate_detection'. No when-not-to-use scenarios or prerequisites are mentioned.

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