# Multi-Language Token Estimator AI Agent Connect

> Analyze text composition and estimate token counts across multiple languages.

## Overview
- **Category:** analysis
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_pLbm2rECwSPhFXh58TUHdck6WZwlkcGQgQk3sOPb/ai-agent-connect
- **Tags:** tokens, unicode, multilingual, text-analysis, llm-optimization

## Description

This MCP server provides deterministic linguistic analysis for mixed-language text. It uses character-level Unicode classification to identify English, Chinese, Japanese, Korean, Cyrillic, and Arabic content. Use `estimate_text_composition` to get a detailed breakdown of character counts, token estimates, and linguistic dominance, or `get_language_ratios` to view the fixed tokenization multipliers used for each language.

## Tools

### estimate_text_composition
Analyzes a text string to provide a granular breakdown of character counts, token estimates, and linguistic dominance

### get_language_ratios
Retrieves the current deterministic token-to-character ratios used by the system

### validate_unicode_range
Verifies if a specific character belongs to one of the supported linguistic ranges

## Prompt Examples

**Prompt:** 
```
Analyze the composition of this text: 'Hello 世界'
```

**Response:** 
```
{ "language_breakdown": [ { "language": "english", "chars": 5, "tokens": 20.0 }, { "language": "chinese", "chars": 2, "tokens": 3.0 } ], "total_tokens": 23.0, "dominant_language": "english", "language_mix_ratio": 0.714 }
```

**Prompt:** 
```
What are the tokenization ratios used by this tool?
```

**Response:** 
```
{ "ratios": { "english": 4.0, "chinese": 1.5, "japanese": 1.4, "korean": 1.8, "cyrillic": 2.8, "arabic": 2.5 } }
```

**Prompt:** 
```
Is the character 'あ' supported?
```

**Response:** 
```
{ "language": "japanese", "isValid": true }
```

## Frequently Asked Questions

**How are tokens calculated?**
Tokens are estimated by multiplying the character count of each language by a specific deterministic ratio (e.g., 4.0 for English, 1.5 for Chinese).

**Which languages are supported?**
The tool supports English, Chinese, Japanese, Korean, Cyrillic, and Arabic based on specific Unicode ranges.

**Can I check specific character ranges?**
Yes, you can use `validate_unicode_range` to verify if a specific character belongs to a supported linguistic category.
