Skip to main content
Glama

analyze_ggplot_code

Read-only

Statically inspect ggplot2 calls and optional data schemas without running R source, so you can validate plot code and identify issues before execution.

Instructions

Statically inspect ggplot calls and optional schemas; R source is never run.

Input Schema

NameRequiredDescriptionDefault
sourceYes
renv_lockNo
data_schemaNo
package_versionsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/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=true. The one real addition is that R source is never executed, which is meaningful safety context beyond the annotations, but nothing is said about how the optional renv_lock/package_versions inputs affect analysis or about failure modes.

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?

A single front-loaded clause with zero filler. It is efficient, though the terseness is part of why parameter detail is missing.

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

Completeness2/5

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

An output schema exists, so return values need not be explained, but three of four inputs are undocumented and there is no indication of what the analysis covers or how lockfile/schema inputs change the result. For a 4-parameter analysis tool this leaves too much unstated.

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

Parameters2/5

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

Schema description coverage is 0% across four parameters, so the description must compensate and largely does not. It hints at 'optional schemas' (data_schema) but leaves renv_lock, package_versions, and the required source parameter completely unexplained.

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?

States a specific verb and resource: static inspection of ggplot calls. The word 'statically' and the ggplot target distinguish it from siblings like analyze_ggraph_code and analyze_ggplotly_compatibility, though it never names those alternatives explicitly.

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

Usage Guidelines2/5

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

No guidance on when to pick this over analyze_ggraph_code, analyze_ggplotly_compatibility, or analyze_tidyr_pipeline, and no prerequisites or exclusions. The agent must infer routing from the tool name alone.

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