Skip to main content
Glama

plot_scatter

Create an x-y scatter plot annotated with Pearson r and sample size. Handles missing values via pairwise deletion and reports counts from file or inline data.

Instructions

plot_scatter —— 可视化组 · 散点图(工具 21,核心实现)。

生成 x-y 散点图,图上标注 Pearson r 与样本量;缺失按成对剔除并报数。 图协议走 _common.save_plot(附录 D);返回顶层 image 绝对路径。 inline 数据: 本工具支持可选 inline_data 参数(v1.2.0 起):与 file_path 二选一, 支持 records 数组或 {"header": [...], "rows": [[...], ...]} 对象两种形态; 规模上限/类型域/data_source 来源标注见 statlab_mcp/docs/SPEC.md 第 12 节。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
x_colNo
y_colNo
file_pathNo
inline_dataNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.2.0

TDQS

A3.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden of behavioral disclosure and does so thoroughly: pairwise missing deletion with reporting, Pearson r and n annotation, save_plot protocol, and an absolute __image__ return path. These details reveal actual side effects and data-handling behavior beyond the schema.

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 compact and front-loads the core purpose first, followed by protocol and inline-data details. The '工具 21,核心实现' header adds minor clutter, but the overall structure is scannable and free of empty phrasing.

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?

For a plotting tool with no output schema and no annotations, the description covers plot contents, missing-data handling, save/return conventions, and inline-data constraints. It is slightly incomplete because it does not explicitly state that exactly one of file_path/inline_data must be set or clarify required column semantics.

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 0%, so the description must compensate. It adds real semantics for inline_data (two accepted shapes, mutual exclusivity with file_path, limits in SPEC §12), but it leaves x_col, y_col, and file_path without explanatory detail beyond their names.

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 states a specific verb and resource: '生成 x-y 散点图' and identifies the tool as the scatter plot in the visualization group. It also discloses key outputs (Pearson r and sample size), though it does not explicitly contrast with sibling plotting tools.

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?

It gives useful selection context between file_path and inline_data ('二选一') and documents the inline_data shapes, but it does not say when to prefer this tool over alternatives such as plot_histogram or correlation_matrix. Usage is implied by the description rather than explicitly stated.

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

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/good-boy4069/statlab-mcp'

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