Skip to main content
Glama
jgt87

local-llm-mcp

by jgt87

Classify text with the local model

local_classify

Classify text into user-supplied labels using a local Ollama model, validating replies against the label set and reporting matched labels or declined responses when no label fits.

Instructions

Put a piece of text into one of the labels you supply, using a local model. The reply is validated against your label set rather than trusted: if the model answers with something outside the list, or hedges between labels, this returns matched=false with the raw reply instead of guessing. By default the model may also answer that no label fits, which comes back as declined=true. That escape hatch helps but does not hold: a small model will still pick a confident in-set label for text that belongs to none of them, so a returned label is triage, not a verdict. Set allowNone=false only when a forced choice is genuinely wanted. Good for triage — log lines, error vs warning, which files look relevant, is this diff risky. Cheap and private; use it where a wrong answer is cheap for you to detect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel tag. Defaults to qwen2.5-coder:7b.
labelsYesAllowed labels. The answer is checked against these.
contentYesThe text to classify.
allowNoneNoDefault true: the model may reply that no label fits, returned as declined=true. Set false to force a choice, accepting that unrelated text will be mislabelled.
instructionNoOptional extra guidance, e.g. what the labels mean.
Behavior5/5

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

No annotations are provided, so the description carries the full burden — and it delivers richly. It discloses that output is validated against label set, returns matched=false with raw reply on hedging, can return declined=true, and honestly warns that a small model will still pick a confident in-set label for out-of-set text ('triage, not a verdict'). This is unusually candid behavioral disclosure beyond what any structured field could convey.

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 description is a single focused paragraph that front-loads the core behavior then layers in caveats and use cases. Every sentence earns its place, but it's slightly dense and could be split into short sections for scannability. Efficient and non-redundant despite its length.

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?

This is a moderately complex tool (5 params, nuanced behavior around declined/matched and model error modes). With 100% schema coverage, no output schema, and no annotations, the description fully compensates: it explains validation behavior, edge cases (hedging, no-label), trust limitation, and appropriate use cases. The behavioral nuance of a model-based classifier is well covered.

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 100%, so the baseline is 3. The description adds meaning beyond the schema by explaining the behavior behind allowNone (the declined escape hatch, forced-choice mislabelling risk) and clarifying that labels are the constraint the reply is validated against. It doesn't add detail on model or instruction params beyond the schema, but the schema already covers them. Marginal added value justifies a 4.

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 uses a specific verb+resource pair ('classify text into labels you supply') and clearly distinguishes from siblings local_ask and local_models by framing it as triage/classification rather than open-ended chat. It even names concrete uses (log lines, error vs warning, which files look relevant), grounding the purpose.

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?

The description explicitly tells when to use it ('Good for triage'), frames its limits ('triage, not a verdict'), and gives concrete when-to-use examples. It advises on the allowNone flag ('Set allowNone=false only when a forced choice is genuinely wanted'). It's missing an explicit 'not for X, use sibling instead' but the triage framing plus sibling names imply exclusion well.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jgt87/local-llm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server