Skip to main content
Glama

keyword_extract

Extract weighted keywords from text using TF-IDF or TextRank for Chinese, with word-frequency fallback for English to enable cheap preprocessing.

Instructions

Keyword extraction with weights. Chinese: jieba TF-IDF or TextRank. English: word-frequency fallback (honest, cheap, deterministic).

Input Schema

NameRequiredDescriptionDefault
textYes
top_kNo
methodNotfidf

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does add real behavioral context: the English path is a 'fallback', characterized as cheap and deterministic, warning the agent about lower-quality output. It says nothing about latency, input size limits, or what 'weights' represent, so gaps remain.

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?

Three terse fragments, front-loaded with the purpose and then the per-language behavior. Efficient, though the telegraphic style ('honest, cheap, deterministic') trades clarity for brevity.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, which the description correctly omits. However, with 0% schema description coverage, the description leaves `top_k` and valid `method` values undocumented, which is not enough for an agent to call the tool confidently.

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

Parameters2/5

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

Schema coverage is 0%, so the description must compensate and largely doesn't. It names the algorithms behind `method` but never lists accepted values (no enum in the schema), and `top_k` is not mentioned at all, leaving two of three parameters undefined anywhere.

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

Purpose4/5

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

States a specific verb and resource: 'Keyword extraction with weights', plus a language-specific method breakdown. It is clear what the tool does, but it never distinguishes itself from near-siblings like noun_phrases or tokenize, which an agent could easily confuse it with.

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 only implied by language: Chinese gets jieba TF-IDF/TextRank, English gets a word-frequency fallback. There is no explicit statement of when to prefer this over noun_phrases or annotate_full, and no exclusion guidance.

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