Skip to main content
Glama
Local AI MCP

Local AI MCP

Official
by TMHSDigital

Benchmark

benchmark

Runs real inference to measure time-to-first-token, generation tokens/sec, and prompt-processing speed, and compares multiple models on the same prompt, ranked by generation speed.

Instructions

HEAVY: Runs REAL inference. Measures a model on this machine with a warmup (absorbs load time) plus N streamed runs: time-to-first-token, generation tokens/sec (runtime-reported when available, else measured after the first token), and prompt-processing speed. Pass models[] to compare several models with the same prompt, ranked by generation speed.

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": "benchmark"
  }
}

Input Schema

NameRequiredDescriptionDefault
runsNoMeasured runs per model (default 3)
modelNoModel id/name to benchmark
modelsNoCompare several models (ranked by median generation tokens/sec)
promptNoPrompt (default: a short fixed prompt)
warmupNoRun a 1-token warmup first so load time is excluded (default true)
providerNoProvider instance name. Omit to let the server choose (local providers only, unless LOCAL_AI_ALLOW_HOSTED_FALLBACK is set).
maxTokensNoTokens to generate per run (default 128)

Output Schema

NameRequiredDescriptionDefault
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / maxTokens / description
      Previous value: -"Max tokens to generate (default 64)"New value: +"Tokens to generate per run (default 128)"
    • addedInput schema / properties / maxTokens / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / maxTokens / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / maxTokens / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / models
      Added value: +{
      +  "description": "Compare several models (ranked by median generation tokens/sec)",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / prompt / description
      Previous value: -"Optional prompt; a short default is used otherwise"New value: +"Prompt (default: a short fixed prompt)"
    • changedInput schema / properties / provider / description
      Previous value: -"Optional provider id"New value: +"Provider instance name. Omit to let the server choose (local providers only, unless LOCAL_AI_ALLOW_HOSTED_FALLBACK is set)."
    • changedInput schema / properties / provider / enum
      Previous value: -[
      -  "ollama",
      -  "lmstudio",
      -  "moonshot",
      -  "openaicompat",
      -  "llamacpp"
      -]New value: +[
      +  "ollama",
      +  "lmstudio",
      +  "llamacpp",
      +  "dockermodelrunner"
      +]
    • addedInput schema / properties / runs
      Added value: +{
      +  "description": "Measured runs per model (default 3)",
      +  "maximum": 20,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / warmup
      Added value: +{
      +  "description": "Run a 1-token warmup first so load time is excluded (default true)",
      +  "type": "boolean"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "model"
      -]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "results": {
      +      "items": {
      +        "additionalProperties": {},
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "results"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.4.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare this is not read-only, not destructive, and not open-world. The description adds important context beyond annotations: it emphasizes the operation is heavy, runs real inference, uses a warmup to absorb load time, and reports runtime-provided versus measured speeds.

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

Conciseness5/5

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

The description is front-loaded with the crucial 'HEAVY' warning and the core purpose, then efficiently covers metrics and the models[] comparison path. Every sentence adds practical information without unnecessary repetition.

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?

Given the output schema and rich parameter descriptions, the description is largely complete: it explains the benchmark's measurement approach, the warmup, and multi-model comparison. It could still clarify whether a model must be loaded first or how model versus models selection should be handled, but the core behavior is clear.

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 seven parameters, including warmup behavior and the models[] comparison mode. The description reinforces the models[] comparison semantics and warmup purpose, but adds little beyond the schema's own parameter descriptions.

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 states a specific action and resource: it runs real inference and measures a model's performance on this machine. It lists concrete metrics (time-to-first-token, generation tokens/sec, prompt-processing speed) and distinguishes itself from ordinary generation tools by framing the operation as measurement and comparison.

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

Usage Guidelines4/5

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

It clearly signals the tool's cost profile with 'HEAVY' and explains the comparison use case via 'Pass models[] to compare several models with the same prompt.' However, it does not explicitly say when not to use it or name an alternative such as complete for normal one-off inference.

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