Skip to main content
Glama

explain_prediction

Explain a single model prediction by computing SHAP feature contributions. Provide a dataset row index or inline feature values to get a clear breakdown of each feature's impact.

Instructions

Return SHAP breakdown for a single instance.

Parameters

index : int | None Row index in the analyzed dataset. data : dict[str, Any] | None Inline feature dictionary for explaining an arbitrary instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
indexNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

The description states the tool returns a SHAP breakdown but does not specify the output format (e.g., list, table), any side effects, or error behavior. Since there are no annotations, the description alone fails to convey what the user can expect beyond a vague 'breakdown'. No information on whether the model is retrained or data is modified.

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

Conciseness3/5

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

The description is concise (one sentence) and well-structured, but it is so brief that it sacrifices necessary information. While there is no fluff, the extreme brevity reduces its utility; a slightly longer description with parameter clarification would be more balanced.

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

Completeness1/5

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

Given the tool's simplicity, the description is still incomplete. It lacks any mention of when to use it relative to siblings, what parameters are required, or what the output looks like. The presence of sibling tools (get_feature_importance, get_interaction, etc.) makes contextual guidance essential, but none is provided.

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

Parameters1/5

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

The parameters 'index' and 'data' are not described at all in the description. The schema provides no annotations, and the description adds no explanation of what these parameters mean, their constraints, or how they interact. A user cannot know whether to provide an index, data, or both, or what format 'data' should take.

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 description uses a clear verb 'Return' and specifies the resource 'SHAP breakdown for a single instance', distinguishing it from sibling tools like get_feature_importance or get_plot. However, it does not elaborate on what the breakdown contains (e.g., feature contributions), leaving some ambiguity for users unfamiliar with SHAP.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus the siblings, such as get_feature_importance or get_interaction. It does not mention any conditions, prerequisites, or typical scenarios, leaving the user to guess when this is the appropriate choice.

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/Manas-maker/shap-mcp'

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