Skip to main content
Glama
mcp-feature-test

mcp-feature-test

by linuxrrze

Ask the client’s LLM (sampling)

sample_llm
Read-only

Sends a sampling request so the client's own LLM generates a reply, returning the text, chosen model and stop reason. Use it to test client sampling support.

Instructions

Send a sampling/createMessage request: the client runs its own LLM for this server (it should let the user review the request first) and returns the reply. Reports the reply, the model the client chose and the stop reason. Options: system prompt, model hint, maxTokens, temperature, includeContext, an image input, and useTools (the 2025-11-25 tool loop with a count_letters tool).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sample_llm"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptNoUser message sent to the client’s LLM (default depends on withImage/useTools)
useToolsNoOffer a count_letters tool to the model (needs the sampling.tools capability)
maxTokensNo
modelHintNomodelPreferences.hints[0].name (substring of the model the client should prefer); empty = no hintclaude
withImageNoSend a 32×32 gradient PNG as an image message before the prompt
temperatureNo
systemPromptNoSystem prompt; empty string = noneYou are a concise assistant. Answer in at most three lines.
includeContextNoAsk the client to add conversation context (needs the sampling.context capability)none

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, but the description adds real substance beyond them: the work happens on the client's side, the user may be shown a review prompt, and the response includes the model the client chose plus the stop reason. It also flags capability prerequisites (sampling.tools for useTools, sampling.context for includeContext), which an agent cannot infer from the schema alone.

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?

Two sentences, front-loaded with the action and the return values, then a compact enumeration of options. The option list is dense but every item earns its place; the only minor cost is that the run-on list reads as a feature dump rather than prioritized guidance.

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

Completeness4/5

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

With eight optional parameters and no output schema, the description carries the return-value burden and does so by naming the reply, model, and stop reason. Combined with the capability notes and annotations, an agent has enough to invoke it correctly, though it doesn't say what happens on client refusal or capability absence.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75%, so the baseline is 3, but the description adds meaning on top: it enumerates the option surface and clarifies that useTools activates a specific 2025-11-25 tool loop with a count_letters tool, and that the image input is a single image message preceding the prompt. Only maxTokens and temperature are left to the schema alone.

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 names a specific protocol action (sampling/createMessage), states the actor (the client runs its own LLM for this server), and states the outcome (returns the reply, the chosen model, the stop reason). This is clearly distinguishable from the elicitation/dialog siblings, which gather user input rather than model output.

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

Usage Guidelines3/5

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

Usage is implied by the verb and by the capability notes on useTools and includeContext, but there is no explicit statement of when to prefer this tool over siblings such as elicit_all_field_types or structured_output, and no exclusions. The parenthetical that the client 'should let the user review the request first' is the only contextual caveat.

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