Skip to main content
Glama

Create or replace style

set_style

Create or replace a reusable style in a mapnotes graph by ID, then assign it to nodes or edges via their style field to control colors, shapes, icons, arrows, widths, and line styles.

Instructions

Create or replace (by id) a reusable style in the graph styles. Assign it via the "style" field of nodes/edges. Colors are CSS colors, e.g. "#7aa2f7". Fields marked "Nodes only" / "Edges only" are rejected for the other target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
iconNoNodes only, icon drawn inside the node. A full-color brand logo from svgl by its library file name without .svg (https://svgl.app), e.g. "slack", "linear", "github_dark"; or a Lucide line icon as "lucide:<name>" (https://lucide.dev/icons), e.g. "lucide:folder", "lucide:bug"
nameNo
sizeNoNodes only, in px, 8-300 (default 36)
arrowNoEdges only, target arrow shape
colorNoNode fill / edge line color
curveNoEdges only
shapeNoNodes only
widthNoEdges only, line width in px, 1-20
targetYes
iconSizeNoNodes only, icon size as a percentage of the node, 10-100 (default 70)
iconColorNoNodes only, color of Lucide icons (default: black or white to suit the fill)
lineStyleNoEdges only
textColorNo
borderColorNoNodes only
borderWidthNoNodes only, outline width in px, 0-20 (default 2)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesCurrent graph file; null when the graph is in memory only
styleYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
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 does disclose the meaningful behavior that the operation is a replace-by-id upsert and that mismatched node/edge fields are rejected, which is useful. However, it omits permissions, whether built-in styles can be overwritten, and whether persistence requires save_graph.

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?

Three sentences, front-loaded with the create/replace behavior, followed by usage and the validation constraint. No filler, though the color-format example sits slightly apart from the main point.

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

Completeness3/5

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

For a 16-parameter mutation tool with no annotations, the description covers the core behavior and the key validation rule, and an output schema presumably documents the return. It still leaves open operational context such as persistence requirements and permission needs, which matters for a write-style tool.

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 coverage is 75%, so most parameters are already documented, and the description reinforces the node/edge field restriction and CSS color format rather than adding new syntax. It clarifies the 'target' semantics and id-based replacement but leaves several parameters (textColor, name) without added meaning. Baseline 3 is appropriate given the schema does most of the work.

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?

States a specific verb+resource ('create or replace a reusable style in the graph styles') and clarifies the upsert-by-id semantics, distinguishing it clearly from the sibling remove_style. The agent immediately knows this writes a style definition rather than manipulating nodes or edges.

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?

Explains how the created style is consumed ('Assign it via the "style" field of nodes/edges') and imposes a concrete applicability rule ('Fields marked "Nodes only" / "Edges only" are rejected for the other target'). It does not state prerequisites such as whether the graph must be loaded or saved, but the usage context is otherwise clear.

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