Skip to main content
Glama

response_quality_score

Read-onlyIdempotent

Score an LLM response against the criteria you pass: coverage of expected_keywords and compliance with max_length. Returns a 0-100 score over the criteria actually measured — or total_score null with the reason when none is given, because relevance and correctness cannot be read off word overlap (a correct one-word answer shares no words with its question). Meaning against a reference answer: run_semantic_tests. Also returns unscored signals: question-term overlap, average sentence length, markdown.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "question": "q",
      "response": "anything"
    },
    "name": "response_quality_score"
  }
}

Input Schema

NameRequiredDescriptionDefault
questionYesThe original question/prompt
responseYesThe LLM response to score
max_lengthNoMaximum character length. Scored as a proportional penalty beyond it.
expected_keywordsNoKeywords a correct answer must contain, as whole words (case-insensitive; a plural in -s/-es counts). Scored as coverage.

Output Schema

NameRequiredDescriptionDefault
gradeNo
statsNo
reasonNo
signalsNo
breakdownNo
max_scoreNo
total_scoreNo
not_measuredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "question": "q",
      +    "response": "anything"
      +  }
      +]
    • changedInput schema / properties / expected_keywords / description
      Previous value: -"Keywords a correct answer must contain (case-insensitive). Scored as coverage."New value: +"Keywords a correct answer must contain, as whole words (case-insensitive; a plural in -s/-es counts). Scored as coverage."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely non-obvious behavior: the 0-100 range, the null-with-reason empty case, the rationale that relevance and correctness cannot be derived from word overlap, and the unscored diagnostic signals (question-term overlap, sentence length, markdown) that also come back.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core behavior is front-loaded in the first sentence and nothing is filler, but the remaining content is packed into one dense em-dash chain covering empty-case behavior, the semantic-routing alternative, and extra return signals, which slightly hurts scanability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, yet the description still supplies the one thing schema can't convey well: why the score may be null and what the score is not measuring. Combined with the explicit sibling handoff for semantic comparison, an agent has everything needed to call this correctly and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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 all four parameters including the whole-word/plural matching rule and the proportional length penalty. The description only restates which criteria are scored and adds no new syntax, defaults, or interaction detail beyond the schema, which is the expected baseline when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Score an LLM response against the criteria you pass') and immediately enumerates the two scored criteria: expected_keywords coverage and max_length compliance. It distinguishes itself from the sibling run_semantic_tests by stating that semantic meaning against a reference answer belongs there, not here.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the condition that selects an alternative explicitly ('Meaning against a reference answer: run_semantic_tests'), and it explains when no score is produced at all ('total_score null with the reason when none is given'). An agent knows both when to call this and when to route elsewhere.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.