TDQS (Tool Definition Quality Score) is an open framework for evaluating the quality with which MCP tool definitions convey information to AI agents. It is the methodology Glama uses to score every tool of every MCP server and hosted connector in its registry. This document is the complete specification, containing scoring criteria, exact prompts, aggregation formulas, and operational practices for running at registry scale, sufficient to reimplement TDQS end to end.
Purpose
TDQS is designed to provide a quality signal for registries that need to rank and recommend servers, a signal that must be interpretable (each score comes with actionable per-dimension justifications), reproducible (the same definition always produces the same evaluation input, facilitating caching, diffing, and auditing), and low-cost enough (it can run on every schema change). TDQS scores only tool definitions, not tool behavior. The input is exactly what an MCP client sees from tools/list.
Key Capabilities
The scoring process is divided into four stages: Stage 1 contextual signals (deterministic code extracts structural facts such as requiredFieldCount, schemaDepth, unionChoiceCount, invocationCost, definitionBytes, hasOutputSchema, inputHash, etc.); Stage 2 hard gates (a missing description scores 1 directly; a tautological description caps purpose clarity at 2); Stage 3 LLM scoring (a single LLM call scores each of the six dimensions from 1-5 and provides justifications citing specific evidence); Stage 4 deterministic post-processing (applies caps, flags contradictions, derives smells, and computes the weighted total score).
The six scoring dimensions and weights: purpose clarity (0.25), usage guidance (0.20), behavioral transparency (0.20), parameter semantics (0.15), conciseness and structure (0.10), contextual completeness (0.10). Each dimension has anchor descriptions for scores 1-5. The total score is the weighted sum, rounded to one decimal place, using integer arithmetic to ensure reproducibility. Scores map to letter grades: A (4.5-5.0), B (3.5-4.4), C (2.5-3.4), D (1.5-2.4), F (1.0-1.4), with B and above considered passing.
Server-level scores include tool definition quality (70%) and consistency (30%), as well as shadow tool evaluation (when tool names are similar, discriminability is evaluated at the server level).
FraThe framework also defines flags that mark classification defects (such as no description, tautological description, contradictory annotations) and smells that mark dimensions below a viable level (dimensions scoring below 3).
Usage
The document provides the complete specification, including scoring prompts (Appendix A) and server consistency prompts (Appendix B), as well as guidelines for improving scores. Users maintaining MCP servers can refer to the scoring criteria as a checklist to improve tool descriptions. Running TDQS requires implementing a four-stage process, of which only Stage 3 involves LLM calls; the rest is deterministic code. The inputHash mechanism supports incremental scoring, re-scoring only when definitions change.
Applicable Scenarios
Suitable for MCP server maintainers optimizing tool description quality, registry platforms ranking and recommending tools by quality, and researchers reproducing or extending the TDQS methodology.
Limitations
TDQS only evaluates tool definition text, not actual tool behavior or performance. Scoring relies on LLM calls (Stage 3) and has some nondeterminism, but deterministic post-processing and integer arithmetic ensure the total score is reproducible. The document does not provide specific installation commands or codebase usage instructions, only specification documentation.