Vellum
Vellum
Un servidor MCP que da respuestas exactas sobre texto · Por Shuja Jamal
Un modelo de lenguaje lee tokens, no caracteres. Pregúntale cuántas letras tiene un párrafo y te dará una estimación, a menudo errónea. Lo mismo ocurre al comparar dos archivos a simple vista, o al adivinar qué coincidencias tendrá una expresión regular sin ejecutarla.
No son problemas difíciles. Simplemente no son el tipo de problema que un modelo está diseñado para resolver. Así que debería preguntar en su lugar.
En vivo | |
Smithery | |
Artículo | EXPERIENCE.md, sobre el uso de MCPs existentes antes de construir este |
Las cinco herramientas
Tool | Lo que responde | En lugar de |
| Caracteres, palabras, líneas, frases y bytes | una estimación basada en el recuento de tokens |
| Índice de legibilidad de Flesch, nivel de grado, frase más larga | una impresión |
| diff unificado, líneas añadidas y eliminadas, similitud | leer ambos y comparar |
| Cada coincidencia, su posición y sus grupos de captura | razonar sobre el patrón |
| md5, sha1, sha256, sha512 | nothing, no puede |
count_text informa de los caracteres visibles por separado de los puntos de código, porque café es cuatro caracteres a los ojos de una persona, cinco para len() y seis bytes. Cuál de esos quieres depende de por qué preguntaste, así que devuelve los tres.
Related MCP server: Text Counter MCP Server
Uso
Claude Code
claude mcp add --transport http vellum https://vellum-mcp.vercel.app/mcpO localmente, por stdio:
claude mcp add vellum -- python -m vellum.serverAlgo que me costó tiempo al instalar el servidor de otra persona: un servidor añadido a mitad de sesión aparece como conectado, pero sus herramientas no se pueden invocar hasta que se reinicie la sesión. Una instalación correcta y una instalación usable son estados distintos.
Claude Desktop
En claude_desktop_config.json:
{
"mcpServers": {
"vellum": {
"command": "python",
"args": ["-m", "vellum.server"],
"cwd": "/path/to/vellum-mcp"
}
}
}Ejecución
pip install -r requirements.txtpython -m vellum.serverEso es stdio, lo que habla un cliente local. Para el transporte HTTP y la página de inicio:
python -m vellum.server --http --port 8000Luego http://localhost:8000 para la página y http://localhost:8000/mcp para el endpoint.
Pruebas
python tests/test_vellum.py46 comprobaciones. La primera mitad llama directamente a las funciones de análisis. La segunda mitad es la que importa: lanza el servidor como subproceso y le habla a MCP, hace el apretón de manos real, lista los tools, las invoca y lee los resultados de vuelta. Un servidor que tiene funciones correctas puede fallar a la hora de hablar el protocolo, y solo la segunda mitad lo detectaría. La primera mitad no.
python tests/test_deploy.pyComprueba el despliegue antes de desplegarlo: que una petición reescrita llegue a la aplicación MCP en la ruta que espera, que ?action=demo llegue a la demo en su lugar, que la tarjeta servidor estática describe las herramientas que realmente existen y que haya exactamente una función, porque eso es lo que el runtime construye.
Despliegue
Vercel, para el alojamiento
vercelNo hay variables de entorno ni secretos: cada tool es una función pura de sus argumentos.
El enrutado es deliberado y merece explicarse, porque la versión obvia no funciona.
Una reescritura de Vercel no entrega a la función la ruta que pidió el navegador. Reescribir /(.*) a una sola función significa que cada petición llega como /api/index, así que una aplicación que enruta por la ruta responderá a cada URL con su propio 404, mientras que, visto desde fuera, el sitio parece totalmente muerto. Perdí una tarde exactamente con eso en un proyecto anterior.
Y el runtime de Python produce una única función para todo el proyecto, no una por archivo. Tenía api/demo.py junto a api/index.py, declarado en vercel.json e incluido en el despliegue, y /api/demo seguía devolvía el 404 de Vercel. vercel inspect muestre el motivo con claridad: una sola lambda de Python. Enrutado por sistema de carpetas entre varios puntos de entrada a Python no ocurre.
Por lo tanto, el despliegue es una función y algunos archivos estáticos:
/ static public/index.html
/.well-known/mcp/server-card.json static generated by build_card.py
/mcp -> /api/index function
/api/demo -> /api/index function, told apart by ?action=demoapi/index.py se decide mediante el query string, porque es la parte que conserva la reescritura mientras POSSITIVE se sustituye la ruta, y vuelve a poner la ruta antes de que la plataforma MCP enrute sobre ella. Hay tests para ambos, porque ninguno de los dos es algo que se deba descubrir con una URL en vivo.
Las dos cosas que funcionaron a la primera fueron la página de inicio y la tarjeta del servidor, y son exactamente las dos que no tocan una función.
Smithery, para el listado
El modelo actual de Smithery es bring your own hosting: le entregas una URL HTTPS pública con un servidor HTTP transmisible y su gateway actúa de proxy hacia él. No hay contenedor que construir.
Despliega primero Vercel y apunta la URL.
Entra en smithery.ai/new.
Coloca
https://tu-despliegue.vercel.app/mcp.Completa el flujo de publicación.
Smithery lee después las tools del servidor para la página de listado. La ruta documentada es un análisis en vivo, con una tarjeta estática en /.well-known/mcp/server-card.json como fallback si el análisis no se puede completar.
En la práctica el fallback fue la ruta principal. El log de la publicación dice:
Server metadata discovered (server card: 5 tools).
Using .well-known/mcp/server-card.json: (5 tools)... que la tarjeta no era una seguro contra un fallo, sino el mecanismo. build_card.py la genera a partir de las propias definiciones de tools del servidor, por eso no habría podido listar tools que no existen.
El log también advierte de que no se había propuesto un esquema de configuración. Eso es correcto e intencional: todas las tools son funciones puras de sus argumentos, por lo tanto no se pide nada al usuario. La advertencia importa para un servidor que envuelve una API y necesita una key.
smithery.yaml recoge los detalles que solicitó el flujo de publicación. Fíjate que no impulsa una construccción: la ruta anterior, la de contenedores, ya no es como funciona este proceso.
Ambos niveles son gratuitos. El nivel hobby de Vercel aloja la función y los archivos estáticos; el listado y registro en Smithery no cuestan nada.
Cómo está compuesto
vellum/
analysis.py the actual work, with no MCP anywhere in it
server.py the five tools, their descriptions, and the transports
api/
index.py the one Vercel function: MCP, and the demo behind a query flag
public/
index.html the landing page
.well-known/mcp/server-card.json generated
tests/
test_vellum.py analysis, then a real MCP handshake over stdio
test_deploy.py the routing and the cardLa función de análisis importa nada de MCP. Eso es lo que permite que los tests la llamen directo y que no se produzca un segundo navegador que se desvíe.
Notas para escribir tools para un modelo de lenguaje
La descripción es la interfaz. No es documentación para un desarrollador; es lo único que un modelo lee cuando decide si una tool sirve. Una descripción vaga hace que la tool nunca se use; una incorrecta hace que se use en el momento equivocado. Así, count_text no dice "devuelve un diccionario de contadores". Dice que se use “count_text” cuando la respuesta necesite un número preciso, porque leer tokens no es lo mismo contar caracteres.
El fallo debe ser legible. Una expresión regular inválida se devuelve como {"valid": false, "error": ...} en lugar de lanzar una excepción, y un algoritmo de hash desconocido menciona los que existen. Un modelo puede actuar sobre eso; no puede actuar sobre un stack trace.
Elige algo que el modelo realmente no sepa hacer. La tentación es envolver una API y llamarle "tool", pero uno una herramienta de "resume este texto" añade un viaje de red a todo un proceso de ida y vuelta a algo que el modelo ya hace mejor él solo. Contar, hacer hash y ejecutar un regex son lagunas reales. Llenar una laguna real es lo que hace que una herramienta se use en lugar de ser ignorada con cortesía.
Por Shuja Jamal, agosto de 2026.
Available Tools
5 toolscount_textCount textA
Count characters, words, lines, sentences and bytes in a piece of text, exactly. Use this whenever the answer needs to be a precise number, because reading tokens is not the same as counting characters. Reports visible characters separately from code points, which differ for accents and emoji.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to measure. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses a key behavioral nuance: reports visible characters separately from code points, which differ for accents and emoji. It also guarantees exact counting. This adds meaningful context beyond the title, though it does not cover edge cases like empty input.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with zero filler. It front-loads the core function ('Count characters, words, lines, sentences and bytes') and then adds usage guidance and a behavioral nuance, all in a compact structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description covers the main operational aspects: what is counted, precision, and the visible-character/codepoint distinction. It does not explicitly state the return format or handle edge cases, but the described behavior is sufficient for an agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes the 'text' parameter with 100% coverage, so the baseline is 3. The description does not add further parameter-specific detail, such as encoding or size limits, so it neither enhances nor detracts from the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool counts characters, words, lines, sentences, and bytes, with a specific verb and resource. It also emphasizes exactness and distinguishes from token-based reading, making the purpose unambiguous even without naming siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear guidance on when to use the tool: 'whenever the answer needs to be a precise number.' It also explains why ('reading tokens is not the same as counting characters'). It does not explicitly list alternative tools or exclusion conditions, so it stops short of full when/when-not coverage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
diff_textsDiff two textsA
Compare two versions of a text and return a unified diff plus exact counts of lines added and removed and a similarity percentage. Use it rather than reading both versions and describing the difference.
| Name | Required | Description | Default |
|---|---|---|---|
| after | Yes | The changed text. | |
| before | Yes | The original text. | |
| context | No | Context lines around each change. |
TDQS
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 outputs (unified diff, line counts, similarity percentage) and its read-only nature implicitly. It does not list limitations or side effects, but since this is a pure comparison function, the disclosed behavior is adequate and clear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with zero filler. The core behavior is stated first, followed by a direct usage recommendation. It is efficient and front-loaded, earning a perfect score for conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with three parameters, two required, and no output schema, the description adequately covers what the tool does and what it returns. It does not specify the exact diff format or similarity algorithm, but these are likely not essential for correct invocation. The description is sufficient for an agent to call this tool accurately.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides 100% coverage with descriptions for all parameters ('original text', 'changed text', 'context lines around each change'). The tool description itself adds no additional meaning to the parameters—it only mentions the purpose in general terms. Since schema coverage is full, the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: compare two versions of a text and return a unified diff, exact line counts added/removed, and a similarity percentage. It uses a specific verb and resource, and it differentiates from siblings by explicitly contrasting with manual description, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides direct usage guidance by saying 'Use it rather than reading both versions and describing the difference,' which tells the agent when to prefer this tool over the obvious alternative. It does not discuss edge cases or exclusions, but for a simple diff tool this is sufficient context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hash_textHash textA
Compute a cryptographic hash of some text. Deterministic, and not something that can be worked out by reading.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to hash. | |
| algorithm | No | Which digest to use. | sha256 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the behavioral burden. It does add useful traits: determinism and non-reversibility ('not something that can be worked out by reading'). However, it does not mention output encoding, the effect of the selected algorithm, or whether any side effects exist, leaving a moderately complete behavioral picture.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short, front-loaded with the core action, and free of filler. The second sentence is slightly vague, but it contributes a behavioral distinction rather than padding, so the length and structure are strong.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool with fully described schema fields and an algorithm enum/default, the description covers the essential invocation context. It does not specify the return format, but that is a minor gap given the task's simplicity and the absence of an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both text and algorithm are already documented in the schema. The description adds no new parameter-level meaning beyond 'some text', so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific action and resource: 'Compute a cryptographic hash of some text'. This clearly distinguishes it from the sibling text-analysis tools (count_text, score_readability, diff_texts, test_regex), leaving no ambiguity about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit guidance about when to use this tool versus alternatives. The intended usage is implied by the self-describing operation, but the description does not state conditions, exclusions, or when a sibling tool would be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
score_readabilityScore readabilityA
Score how hard a piece of text is to read, using Flesch reading ease and a grade level, with a plain description of what the number means. Also reports the longest sentence, which is usually the reason prose scores badly.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The prose to score. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It goes beyond a simple one-liner by explaining not only the metrics (Flesch ease, grade level) but also that it provides a plain-language interpretation of the number and reports the longest sentence as a likely cause of poor readability. This gives the agent a clear picture of what the tool does and what it outputs, though it does not mention every detail (e.g., range of scores or edge cases).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with zero filler. The main purpose is front-loaded ('Score how hard a piece of text is to read'), followed by the specific metrics and an additional behavior (longest sentence). Every sentence earns its place and the structure is highly efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given there is no output schema, the description does a good job of explaining what the tool returns: Flesch score, grade level, plain language interpretation, and longest sentence. This is sufficient for an agent to understand the tool's behavior and call it correctly. It could be more complete by specifying numeric ranges or examples, but those are not strictly necessary for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%: the only parameter 'text' is described as 'The prose to score.' The description adds minimal semantic value beyond this, only referring to 'a piece of text' and 'prose' again. Since the schema fully documents the parameter, a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: scoring how hard a text is to read, with specific metrics (Flesch reading ease and grade level). It also distinguishes itself from all sibling tools (count, diff, regex, hash) by focusing on readability assessment. The verb 'score' and resource 'a piece of text' are specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage through its purpose: use this when you need readability metrics for prose. However, it does not explicitly state when to use this tool versus alternatives, nor does it mention exclusions or specific conditions. Since the sibling tools are clearly different (counting, diffing, regex testing, hashing), the intended use is inferable but not explicitly articulated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
test_regexTest a regular expressionA
Run a regular expression against text and report every match with its position and capture groups. An invalid pattern comes back as an error message rather than an exception. Use it to check a pattern actually does what it looks like it does.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to search. | |
| flags | No | Any of i (ignore case), m (multiline), s (dotall), x (verbose). | |
| pattern | Yes | The regular expression, in Python syntax. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description fully carries the behavioral burden. It discloses the return content (all matches, positions, capture groups), error handling for invalid patterns, and the read-only nature of the operation. This is meaningful behavioral information beyond what the schema provides.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, each earning its place: the first states the core action and output, the second clarifies error behavior, and the third gives the intended use case. It is front-loaded and contains no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple regex-testing utility, the description provides everything an agent needs: the operation, the output shape, error handling, and the use case. There is no output schema, so the description appropriately fills that gap by explaining what the tool reports.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents pattern, text, and flags. The description adds a little context by mentioning positions and capture groups, but it does not need to describe parameters further since the schema already does so adequately.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('Run a regular expression against text') and a precise output ('every match with its position and capture groups'). It also distinguishes this from sibling tools like count_text, score_readability, diff_texts, and hash_text by focusing on regex behavior rather than counting, scoring, diffing, or hashing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The final sentence gives a clear usage context: 'Use it to check a pattern actually does what it looks like it does.' This tells an agent when the tool is appropriate, though it does not explicitly name alternative tools or state when not to use it. The context is clear enough that an agent can route to this tool for regex verification.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v1.0.0- First observed
count_text - First observed
diff_texts - First observed
hash_text - First observed
score_readability - First observed
test_regex
TDQS
Scored across 5 tools
Each tool performs a unique, clearly distinguishable operation: counting metrics, readability assessment, diffing, regex testing, and hashing. There is no overlap or ambiguity between them, so an agent can reliably pick the right tool for a given task.
All tool names follow a consistent verb_noun pattern (count_text, score_readability, diff_texts, test_regex, hash_text) using snake_case throughout. The naming is predictable and immediately conveys the action and object.
With exactly five tools, the server is well-scoped for a text utility purpose. Each tool covers a distinct need without bloat, and the count is within the ideal range for clarity and usability.
The set covers core text analysis and manipulation operations (counting, readability, diffing, regex, hashing). Minor gaps like string transformation or encoding conversion exist, but these are not obvious dead-ends for the primary use cases, so the surface is reasonably complete.
Maintenance
Related MCP Connectors
Text tools: stats, language, case, lines, replace, extract, keywords, summary, sentiment, diff.
Exact text tools for AI agents: unified diff, patch apply, regex testing, grapheme counting.
Exact character/word counting, reversal, palindrome checks, indexing, sorting; Unicode-safe.
English readability scores (Flesch, Flesch-Kincaid, Fog, SMOG) and text stats. Text never stored.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides text analysis tools including word counting, reading time estimation, keyword density analysis, and sentiment scoring.5 npm37 PyPIMIT
- AlicenseAqualityDmaintenanceProvides a tool to calculate basic text metrics including character count, characters without spaces, and word count.1MIT
- AlicenseNot gradedqualityBmaintenanceProvides text statistics and readability scores (Flesch Reading Ease, Flesch-Kincaid Grade Level) via offline, keyless tools.191 npmMIT
- FlicenseAqualityDmaintenanceProvides 9 text processing tools for analysis, sentiment, language detection, summarization, spelling, and readability tips.9-