Skip to main content
Glama
rcarmo

office-document-mcp-server

by rcarmo

excel_add_chart

Add a line, bar, column, or pie chart to a specified cell position in an Excel file using a given data range.

Instructions

Add a chart to an Excel worksheet.

Example: excel_add_chart( file_path="report.xlsx", data_range="Sheet1!A1:D8", chart_type="line", title="Growth Forecast", position="F2" )

Args: file_path: Path to the .xlsx or .xlsm file data_range: Range containing data (e.g., "A1:D10" or "Sheet1!A1:D10") chart_type: "line", "bar", "column", or "pie" sheet_name: Optional sheet name (overrides sheet in data_range) title: Optional chart title position: Top-left anchor cell for the chart (default "E2") has_header: Treat first row as header for series names use_first_column_as_categories: Use first column as category labels output_path: Optional output path (defaults to overwriting input)

Returns: Status dictionary with chart details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the .xlsx or .xlsm file
data_rangeYesRange containing data (e.g., "A1:D10" or "Sheet1!A1:D10")
chart_typeNo"line", "bar", "column", or "pie"
sheet_nameNoOptional sheet name (overrides sheet in data_range)
titleNoOptional chart title
positionNoTop-left anchor cell for the chart (default "E2")
has_headerNoTreat first row as header for series names
use_first_column_as_categoriesNoUse first column as category labels
output_pathNoOptional output path (defaults to overwriting input)
Behavior4/5

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

Annotations indicate non-read-only and non-destructive behavior. The description explicitly states that output_path defaults to overwriting the input file, disclosing a key behavioral trait. However, it does not cover authorization requirements or rate limits.

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 sentence, an illustrative example, and a bulleted Arg list. While not extremely concise, it efficiently uses space without redundancy.

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 tool has 9 parameters with 2 required and no output schema, the description covers all essential aspects: inputs, defaults, and return value (status dictionary). It lacks only fine-grained details like error conditions or exact return format.

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

Parameters4/5

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

With 100% schema coverage, baseline is 3. The description adds value by providing an example and an Args block that explains each parameter in context (e.g., 'Optional sheet name (overrides sheet in data_range)') and indicates defaults, going beyond the schema alone.

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 ('Add a chart to an Excel worksheet') with a specific verb and resource. Among siblings, it is distinct from other Excel tools like excel_add_sheet, making its purpose unambiguous.

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?

The description provides an example but no explicit guidance on when to use this tool versus alternatives or when not to use it. Usage is implied (when a chart is needed), but no exclusions or contextual advice are given.

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/rcarmo/python-office-mcp-server'

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