<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/mcp-tool-definition-quality-score-linter-in-typescript-zzb7kof9t" -->

---
title: MCP Tool Definition Quality Score Linter in TypeScript
description: A step-by-step build of a TypeScript CLI linter that scores MCP (Model Context Protocol) tool definitions against a weighted quality rubric covering schema...
canonical: https://daily.dev/posts/mcp-tool-definition-quality-score-linter-in-typescript-zzb7kof9t
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: MCP Tool Definition Quality Score Linter in TypeScript | daily.dev
og:description: A step-by-step build of a TypeScript CLI linter that scores MCP (Model Context Protocol) tool definitions against a weighted quality rubric covering schema...
og:url: https://daily.dev/posts/mcp-tool-definition-quality-score-linter-in-typescript-zzb7kof9t
og:image: https://api.daily.dev/og/posts/zZb7kOF9t.png
og:image:alt: MCP Tool Definition Quality Score Linter in TypeScript
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Tool Definition Quality Score Linter in TypeScript

**[SitePoint](https://daily.dev/sources/sitepoint)** · 19 min read · 1 upvotes · 0 comments

## Summary

A step-by-step build of a TypeScript CLI linter that scores MCP (Model Context Protocol) tool definitions against a weighted quality rubric covering schema validity, description quality, argument completeness, naming conventions, and constraint richness. The tutorial walks through project setup with Ajv for JSON Schema meta-validation, writing individual rule functions, aggregating scores into a 0-100 scale with PASS/WARN/FAIL statuses, wiring a CLI entry point that reads tool JSON files, and testing against sample tool definitions including a well-formed, a mediocre, and a poorly-formed example. It closes with ideas for CI/CD integration and live auditing against a running MCP server.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.sitepoint.com/mcp-tool-definition-quality-score-linter>

## Questions this post answers

### What fields make up an MCP tool definition and what does the model actually see?

An MCP tool definition exposed through ListToolsResult has three core fields: name, description, and inputSchema. The LLM relies entirely on these to decide which tool to call, what arguments to supply, and when to invoke it; description is optional but strongly recommended, and inputSchema is a JSON Schema object defining argument types, descriptions, and constraints.

_Developers wiring up MCP servers reliably can track schema and tooling changes on daily.dev._

### How should I weight schema validity versus description quality when scoring MCP tool definitions?

A practical rubric weights schema validity at 30% (an invalid schema causes runtime failures so it's the most severe defect), description quality at 25%, argument completeness at 25%, naming conventions at 10%, and constraint richness at 10%. Scores of 75+ pass, 50-74 warn, and below 50 fail as a real risk of agent misuse.

_Anyone designing quality gates for agentic tooling can follow related deep dives on daily.dev._

### Why do unconstrained string arguments cause problems for LLM agents calling tools?

Unconstrained strings are among the most common sources of malformed agent inputs because the model has no enum, pattern, or minLength constraint to guide valid values, wasting its capacity generating invalid inputs. Adding an enum for a finite value set, or a pattern/minLength for free text, gives the model a clear boundary and reduces misfires.

_Teams hardening agent tool schemas against bad inputs can keep up with these patterns via daily.dev._

## Similar posts on daily.dev

- [Defining MCP Tools in C\#: Attributes, JSON Schema, and Error Handling](https://daily.dev/posts/defining-mcp-tools-in-c-attributes-json-schema-and-error-handling-a9g2dlmba) · We Are .NET · 3 upvotes · 0 comments
- [Production MCP Server Architecture in TypeScript](https://daily.dev/posts/production-mcp-server-architecture-in-typescript-hs138y68c) · SitePoint · 0 upvotes · 0 comments
- [Why Do Models Love MCP So Much?](https://daily.dev/posts/why-do-models-love-mcp-so-much--zhmv4gtjt) · Medium · 0 upvotes · 0 comments
- [How to Build Your First MCP Server \(2026 Guide\)](https://daily.dev/posts/how-to-build-your-first-mcp-server-2026-guide--rumt2ntru) · Alex CloudStar · 2 upvotes · 1 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#typescript](https://daily.dev/tags/typescript), [#mcp](https://daily.dev/tags/mcp)

[View this post on daily.dev](https://daily.dev/posts/mcp-tool-definition-quality-score-linter-in-typescript-zzb7kof9t)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"MCP Tool Definition Quality Score Linter in TypeScript","url":"https://daily.dev/posts/mcp-tool-definition-quality-score-linter-in-typescript-zzb7kof9t","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/mcp-tool-definition-quality-score-linter-in-typescript-zzb7kof9t"},"datePublished":"2026-09-03T18:34:08.664Z","dateModified":"2026-09-14T07:08:24.976Z","description":"A step-by-step build of a TypeScript CLI linter that scores MCP (Model Context Protocol) tool definitions against a weighted quality rubric covering schema...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/dbea76851a11771f435afb1b6434afdd?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/dbea76851a11771f435afb1b6434afdd?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"SitePoint","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"SitePoint","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/sitepoint","url":"https://daily.dev/sources/sitepoint"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/mcp-tool-definition-quality-score-linter-in-typescript-zzb7kof9t","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,typescript,mcp","timeRequired":"PT19M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"SitePoint","item":"https://daily.dev/sources/sitepoint"},{"@type":"ListItem","position":3,"name":"MCP Tool Definition Quality Score Linter in TypeScript"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/mcp-tool-definition-quality-score-linter-in-typescript-zzb7kof9t#faq","mainEntity":[{"@type":"Question","name":"What fields make up an MCP tool definition and what does the model actually see?","acceptedAnswer":{"@type":"Answer","text":"An MCP tool definition exposed through ListToolsResult has three core fields: name, description, and inputSchema. The LLM relies entirely on these to decide which tool to call, what arguments to supply, and when to invoke it; description is optional but strongly recommended, and inputSchema is a JSON Schema object defining argument types, descriptions, and constraints. Developers wiring up MCP servers reliably can track schema and tooling changes on daily.dev."}},{"@type":"Question","name":"How should I weight schema validity versus description quality when scoring MCP tool definitions?","acceptedAnswer":{"@type":"Answer","text":"A practical rubric weights schema validity at 30% (an invalid schema causes runtime failures so it's the most severe defect), description quality at 25%, argument completeness at 25%, naming conventions at 10%, and constraint richness at 10%. Scores of 75+ pass, 50-74 warn, and below 50 fail as a real risk of agent misuse. Anyone designing quality gates for agentic tooling can follow related deep dives on daily.dev."}},{"@type":"Question","name":"Why do unconstrained string arguments cause problems for LLM agents calling tools?","acceptedAnswer":{"@type":"Answer","text":"Unconstrained strings are among the most common sources of malformed agent inputs because the model has no enum, pattern, or minLength constraint to guide valid values, wasting its capacity generating invalid inputs. Adding an enum for a finite value set, or a pattern/minLength for free text, gives the model a clear boundary and reduces misfires. Teams hardening agent tool schemas against bad inputs can keep up with these patterns via daily.dev."}}]}
```

