Skip to main content
Glama

plot_violin

Generate violin plots to visualize and compare data distributions using kernel density estimation and box plot elements for detailed statistical analysis.

Instructions

Create a violin plot for detailed distribution comparison.

This tool generates violin plots, which combine box plots with kernel density estimation to show the full distribution shape.

Args: data: For direct input, list of lists (each sublist is a dataset). For file input, column name(s) or single column. data_input: Optional. {"file_path": "path/to/file.csv"} or {"data": {...}} labels: Optional labels for each dataset style: Optional. {"title": "...", "xlabel": "...", "ylabel": "...", "grid": True} output: Optional. {"format": "png/pdf/svg", "width": 15, "height": 10, "dpi": 300}

Returns: PIL Image object or bytes containing the plot

Examples: Comparing distributions: >>> plot_violin( ... data=[[1, 2, 2, 3, 3, 3, 4], [2, 3, 4, 4, 5, 5, 6]], ... labels=["Control", "Treatment"] ... )

From file:
>>> plot_violin(
...     data="reaction_time",
...     data_input={"file_path": "experiment.csv"},
...     style={"title": "Reaction Time Distribution"}
... )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
data_inputNo
labelsNo
styleNo
outputNo
Behavior3/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. It discloses that the tool 'generates violin plots' and returns a 'PIL Image object or bytes,' which covers basic behavior. However, it lacks details on performance, error handling, or constraints like data size limits. The examples add some context, but more behavioral traits (e.g., memory usage, file format support) would improve transparency.

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 well-structured with a clear purpose statement, parameter explanations, return value, and examples. It's appropriately sized for a 5-parameter tool with no schema coverage. However, it could be slightly more concise by integrating the examples more tightly, but overall, each sentence adds value without waste.

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?

Given the complexity (5 parameters, 0% schema coverage, no output schema, no annotations), the description does a good job of completeness. It explains the tool's purpose, parameters, return values, and provides examples. The main gap is the lack of output schema, but the description specifies the return as 'PIL Image object or bytes,' which compensates adequately. More behavioral details would push it to a 5.

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

Parameters5/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 fully. It provides detailed semantics for all parameters: 'data' is explained with examples for direct input (list of lists) and file input (column name), 'data_input' specifies optional file or data objects, 'labels' for dataset labels, 'style' for plot customization, and 'output' for format and dimensions. This adds significant meaning beyond the bare schema.

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 clearly states the tool's purpose: 'Create a violin plot for detailed distribution comparison.' It specifies the exact visualization type (violin plot) and distinguishes it from sibling tools like plot_box or plot_histogram by explaining that it 'combines box plots with kernel density estimation to show the full distribution shape.' This is specific and differentiates it from alternatives.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: for 'detailed distribution comparison' where showing the 'full distribution shape' is important. It implies usage through examples comparing 'Control' and 'Treatment' groups. However, it doesn't explicitly state when not to use it or name specific alternatives among the siblings, though the context suggests it's for distribution visualization versus other plot types.

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/nishide-dev/ml-research-mcp'

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