Skip to main content
Glama

SHAP single-case explanation / SHAP 单样本解释

shap_explain
Read-only

SHAP single-case explanation / SHAP 单样本解释 | USE WHEN: explain why one patient was predicted high risk (feature contributions) | ALIASES: SHAP, 解释预测, 为什么高风险, 特征贡献, explain prediction, 可解释性 | RETURNS: SHAP 贡献图

Input Schema

NameRequiredDescriptionDefault
csv_dataNoCSV 文本
model_typeNo模型类型
sample_indexNo样本序号

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered structurally. The description adds only 'RETURNS: SHAP 贡献图', which is a useful output hint but says nothing about compute cost, what happens with an invalid sample_index, or that all inputs are effectively mandatory despite being optional.

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 card format is front-loaded and structured: purpose, trigger, aliases, return value. The ALIASES block is keyword padding rather than explanation, but it is compact and does serve discovery, so waste is limited.

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?

For a 3-parameter analytical tool with no output schema, the description covers the purpose and a one-line return format. It omits input requirements (all three parameters are marked optional yet functionally necessary) and any parameter detail on model_type, leaving a real gap for correct invocation.

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% and all three parameters are documented in the schema, so the baseline of 3 applies. The description adds only the implied notion that sample_index selects a single case; it does not enumerate valid model_type values or CSV format expectations.

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?

The title and first sentence name a specific technique and scope: SHAP single-case explanation, i.e. per-sample feature contributions. The USE WHEN line adds a concrete example scenario, making it distinguishable from aggregate-model siblings, though no sibling is explicitly named as the alternative.

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?

There is an explicit USE WHEN scenario ('explain why one patient was predicted high risk'), which is more than most siblings offer. However, there is no when-not guidance, no mention of alternatives (e.g. global feature importance vs single-case), and no stated prerequisites such as needing a trained model plus CSV data.

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.

Resources