# TextRazor MCP

> TextRazor delivers advanced NLP right through your AI client. It analyzes raw text or public URLs to pull out entities, topics, and complex relationships. You can build custom dictionaries for industry jargon or classify entire documents automatically. This server lets your agent perform deep semantic analysis on anything you feed it.

## Overview
- **Category:** knowledge-management
- **Price:** Free
- **Tags:** nlp, entity-extraction, text-analysis, semantic-web, topic-tagging

## Description

You connect **TextRazor** right into your AI client. Your agent gains serious text analysis power, letting it process raw copy or even live web URLs to pull out deep semantic insights. You don't just get keywords; you get the structure of what people are talking about.

### Deep Text Analysis

When you run `analyze_text`, your agent analyzes provided content—whether it’s a block of text you paste or an entire public URL. It pulls out key entities, underlying topics, and complex relationships between those elements. This tool handles the heavy lifting, giving you structured data on everything from named people to industry-specific concepts.

### Custom Vocabulary Management

You can train your agent to understand niche language by building custom dictionaries. If you deal with proprietary jargon or highly specialized field terms, this is how you handle it. You start by running `create_dictionary` to build a new vocabulary set. Once that dictionary exists, you use `add_dictionary_entries` to feed it specific terms and their definitions. To manage what’s there, your agent can list all the dictionaries you've created using `list_dictionaries`. If you need to see what exactly is inside one of those custom sets, you run `get_dictionary` by name or ID, which then allows you to check every entry in that specific dictionary via `list_dictionary_entries`. You can also permanently wipe a dictionary and all its contents with `delete_dictionary`.

### Content Classification (Topics)

When organization is the game, you use the topic classifiers. To start, your agent can create or update a custom classification system using `create_category`. This lets you define buckets for your content—say, 'Q3 Reports' or 'Client Feedback.' If a category needs to go, you delete it with `delete_category`. You always know what categories are live by calling `list_categories` on the classifier you’ve set up. These tools let you automatically tag and sort entire documents into predefined buckets.

### Account Metrics & Status

If you need to check your usage limits or service status, your agent calls `get_account`. This single tool pulls all your current account details, including how much capacity you've used up against your assigned API limits. It’s quick and gives you the numbers you need.

This server lets your agent do three main things: it analyzes content for deep structure; it builds custom dictionaries to recognize domain-specific terms; and it sets up classifiers to automatically tag content into specific buckets.

## Tools

### add_dictionary_entries
Adds specific terms to a custom dictionary you created.

### analyze_text
Analyzes provided text or URL content to pull out entities, topics, and relationships.

### create_category
Creates or updates a custom topic classifier for organizing content.

### create_dictionary
Builds a new custom dictionary to recognize proprietary terms.

### delete_category
Removes an existing custom classifier category.

### delete_dictionary
Deletes an entire custom dictionary and all its entries permanently.

### get_account
Retrieves your current account details, usage metrics, and service limits.

### get_dictionary
Pulls the specific details of a custom dictionary by name or ID.

### list_categories
Shows all current categories within a specified custom classifier.

### list_dictionary_entries
Lists every entry contained within a specific custom dictionary.

### list_dictionaries
Retrieves a list of all custom dictionaries you have created.

## Prompt Examples

**Prompt:** 
```
Analyze this text for entities and topics: 'TextRazor is a startup based in London specializing in NLP.'
```

**Response:** 
```
I've analyzed the text. I found entities like 'TextRazor' (Company) and 'London' (Place), and identified topics related to 'Natural Language Processing' and 'Technology startups'.
```

**Prompt:** 
```
Extract relations and dependency trees from the URL https://www.textrazor.com/
```

**Response:** 
```
I've processed the content from the URL. I've mapped out the grammatical dependency trees and extracted key relations between the entities mentioned on the page.
```

**Prompt:** 
```
Create a new dictionary called 'MedicalTerms' for specialized analysis.
```

**Response:** 
```
I have successfully created the 'MedicalTerms' dictionary. You can now start adding entries to it using the add_dictionary_entries tool.
```

## Capabilities

### Analyze Content
Pass text or a URL to analyze it for key entities, underlying topics, and relationship structures.

### Manage Custom Vocabulary
Create and update specialized dictionaries so your agent recognizes domain-specific terminology.

### Classify Documents
Define and use custom classifiers to automatically tag content into predefined organizational categories.

### Retrieve Account Metrics
Get current usage details, including API limits and billing information.

## Use Cases

### Monitoring Competitor News Flow
A Market Researcher needs to track how often competitors mention 'AI chip architecture' and which specific executives are cited. They feed 50 recent news articles into the agent, running `analyze_text` with an entity extractor focused on people and companies. The result is a structured table showing every instance of an executive name tied directly to a company name.

### Onboarding New Industry Jargon
A Data Scientist receives reports full of highly specialized medical terms the current AI model doesn't recognize. They use `create_dictionary` to build a 'Cardiology Terms' dictionary, then run `analyze_text`. The agent now correctly identifies and labels complex diagnoses that were previously ignored.

### Cleaning Up Web Scraped Data
A Content Manager scrapes 200 product pages from a competitor's site. If the raw HTML is messy, analysis fails. The agent first uses the server's cleanup capabilities (part of `analyze_text`) to strip all tags and metadata before extracting entities like 'model number' or 'release date,' guaranteeing clean data.

### Building a Content Taxonomy
A team needs to ensure every new blog post falls into one of five predefined topics. They use `create_category` to set up the taxonomy, then run `analyze_text`. The agent automatically suggests the correct category for each piece of content based on semantic analysis, eliminating manual review.

## Benefits

- Structured data comes out of unstructured noise. Instead of manually reading thousands of articles to find every mention of 'Project Phoenix,' the `analyze_text` tool extracts all associated entities and relationships instantly.
- Stop guessing about jargon. You can use `create_dictionary` to build a custom glossary for your company's internal acronyms, ensuring that even niche terms are correctly identified during analysis.
- Organize content automatically. Instead of having someone manually read an article and tagging it 'Finance/Q3 Reports,' the agent runs `analyze_text` and uses the classification results to assign precise topics and categories.
- Scale your data ingestion without hiccups. The ability to strip HTML tags when calling `analyze_text` means you can analyze content pulled directly from messy web scrapes or poorly formatted reports.
- Manage your knowledge base programmatically. Use tools like `list_dictionaries` and `get_dictionary` to check what vocabulary is already active before attempting a complex analysis run.

## How It Works

The bottom line is that your agent executes complex NLP tasks without needing manual setup or specialized coding beyond calling the right tool.

1. First, subscribe to the server and provide your TextRazor API Key.
2. Next, instruct your AI client (agent) to use a specific tool, like `analyze_text`, providing it with the content or URL you want analyzed.
3. The system sends the data to TextRazor, which returns structured JSON containing the extracted entities, topics, and relationships.

## Frequently Asked Questions

**How does the TextRazor MCP Server handle text that comes from a website URL?**
The server processes both raw text and public URLs. When you pass a URL to `analyze_text`, it automatically scrapes the content, cleans out HTML tags, and performs the full analysis on the clean body text.

**Can I make TextRazor recognize my company's internal acronyms?**
Yes. You must first use `create_dictionary` to build a custom dictionary, then call `add_dictionary_entries` to populate it with your proprietary terms before running analysis.

**What if I want to tag documents into multiple groups?**
Use the categorization tools. First, define the groups using `create_category`, then run the document through `analyze_text`. The tool classifies the content based on its semantic fit.

**Is there a way to check my API usage limits with TextRazor?**
You can check your account standing by calling the `get_account` tool. This returns all current metrics, including remaining credits and rate limits for your service.

**When I use the `analyze_text` tool with a URL, what does TextRazor return regarding relationships?**
It returns structured data detailing dependencies between entities. The response maps out grammatical connections and key relationships found on the page, giving you more than just keywords.

**Before running an analysis, how do I review my custom dictionary contents with TextRazor?**
You use the `list_dictionary_entries` tool to see every term currently defined. This lets you verify your specialized vocabulary before adding new entries or running a deep analysis.

**If my text input is too large for the API, how does TextRazor report that error when using `analyze_text`?**
The API response includes a specific status code and an error message detailing the size limit violation. This tells you exactly how much shorter your input needs to be.

**How do I check which custom classifiers are available for my account using TextRazor?**
You call `list_categories` to pull a list of all existing classification schemas. This lets you see what categories you can use or delete before creating a new one.

**How can I analyze a web page directly without copying the text?**
Use the `analyze_text` tool and provide the target link in the `url` parameter. TextRazor will fetch the content and process it based on your requested extractors.

**Can I filter entities by specific types like DBPedia?**
Yes, the `analyze_text` tool includes an `entities_filterDbpediaTypes` parameter. You can provide a list of types to narrow down the results to exactly what you need.

**How do I manage custom terminology for my business?**
You can use `create_dictionary` to initialize a new knowledge base and then use `add_dictionary_entries` to populate it with your specific terms and IDs.