- DATA
- VERIFICATION
- SUBSTRINGS
- HUMAN
Short answer
How can I check word counts and substrings with my AI?
Your AI uses the analyze_string_metrics tool to scan documents for exact word or substring counts. This provides a mathematical check against what the AI thinks it wrote, helping you spot hallucinations immediately. Here is how the process works.
Where every audit lands.
The outcomes of your audit
The AI processes your text and delivers these specific results.
DATA
Exact frequency counts
The AI uses analyze_string_metrics to pull the precise number of times a word appears. You get a hard number instead of a guess.
VERIFICATION
Hallucination detection
By comparing the count to the actual text, you catch instances where the AI claims a word exists when it doesn't. This keeps your content honest.
SUBSTRINGS
Pattern matching
The tool looks for specific character sequences, not just whole words. This helps you find hidden patterns or repeated typos.
HUMAN
Final content review
The AI provides the numbers, but you decide if the frequency of certain terms meets your stylistic or technical requirements.
The workflow
What your AI does when the text arrives.
The AI moves from raw data to verified metrics through a specific sequence of checks.
Scan the document
The agent reads the provided text or file to prepare for the metric extraction.
analyze_string_metricsCount occurrences
The AI runs the specific string search to find every instance of your target word or substring.
analyze_string_metricsValidate counts
The agent compares the requested substrings against the total document length to ensure accuracy.
analyze_string_metricsReport findings
The AI presents the final tally and any discrepancies it found during the scan.
analyze_string_metrics
Try it
Copy these to start.
Use these prompts to trigger the audit immediately.
Starting points
Replace the bracketed text with your specific words or document names.
String Analyzer Connector
You're all set. Choose your MCP client and follow the setup instructions.
https://edge.vinkius.com/vk_preview_cB97ZdkNoybwfO5XIE4OQ5jshn2W4nG5oUaqdTPO/mcpClaude Desktop
Follow the steps below to connect in seconds.
- 1In Claude Desktop, open Settings → Connectors.
- 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
- 3Click Add and start a new chat — String Analyzer capabilities are ready to use.
{
"mcpServers": {
"string-metrics-analyzer-mcp": {
"url": "https://edge.vinkius.com/vk_preview_cB97ZdkNoybwfO5XIE4OQ5jshn2W4nG5oUaqdTPO/mcp"
}
}
}Count how many times the word 'innovation' appears in this report.
Check the frequency of the substring 'corp' in the legal document.
How many times does the phrase 'user agreement' show up in this file?
Run a frequency check for the term 'revenue' in the quarterly spreadsheet.
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect String Metrics Analyzer once, then ask.
Just click the connection link to link the MCP to your client. Your credentials stay encrypted, and you can start auditing right away.
Connect String Metrics Analyzer to your AIFAQ
How this task behaves
- 01
Can the AI change the text it finds?
No. The tool only reads and counts the text. It cannot edit, delete, or rewrite your documents.
- 02
Does this work for partial words?
Yes. You can search for specific substrings, which allows you to find parts of words or specific character sequences.
- 03
Can the AI fix hallucinations automatically?
No. The AI identifies the frequency to help you spot hallucinations, but you must manually correct the text.
- 04
Will it count case-sensitive words?
Yes, the tool performs exact string matching, so it distinguishes between uppercase and lowercase if you specify it.
- 05
Can I use this on a live website?
No. You must provide the text or the document content directly to the AI client for the tool to process it.
More questions about String Metrics Analyzer? The Connector page answers them. See everything the String Metrics Analyzer Connector can do
Connect String Analyzer to Claude, Cursor, ChatGPT & more
