Skip to main content
Glama
123pc
by 123pc

geogebra_draw_mechanism

Create animated mechanical linkages from JSON design: execute commands, apply styles, animate, and save as .ggb and .png.

Instructions

Create a complete mechanism: new construction → commands → styles → save .ggb + PNG. Use geogebra_batch for commands instead of this tool unless you need one-step save.

── MECHANISM TEMPLATES ──

Crank-Rocker (曲柄摇杆): O1=(0,0) O2=(d,0) α=angle° crank_len=r coupler_len=L rocker_len=R A = O1 + (rcos(α), rsin(α)) c1 = Circle(A, L) c2 = Circle(O2, R) B = Intersect(c1, c2, 1) Segment(O1, A) Segment(A, B) Segment(B, O2) Animate: StartAnimation(α) Style: thick segments, colored points

Slider-Crank (曲柄滑块): O=(0,0) α=angle° r=crank L=coupler A = O + (rcos(α), rsin(α)) c = Circle(A, L) guide = Line((0,-r), (10,-r)) B = Intersect(c, guide, 1) Segment(O, A) Segment(A, B) Circle(B, 0.1) Animate: StartAnimation(α)

Double-Crank / Drag-Link: O1=(0,0) O2=(d,0) α=angle° r1,r2=crank lengths L=coupler A = O1 + (r1cos(α), r1sin(α)) B = O2 + (r2cos(α+offset), r2sin(α+offset)) Segment(O1,A) Segment(A,B) Segment(B,O2) Animate: StartAnimation(α)

Four-Bar Linkage (general): Same as crank-rocker but adjust lengths. Valid if shortest+longest ≤ sum of other two.

── design_json FORMAT ── { "perspective": "G", "animate": "α", "speed": 0.5, "commands": ["O1=(0,0)", "O2=(6,0)", "α=45°", ...], "styles": [ {"label": "A", "color": [1,0,0], "point_size": 5}, {"label": "Segment(O1,A)", "thickness": 5}, {"label": "O1", "point_size": 6, "color": [0,0,0]} ] }

── WORKFLOW ──

  1. New construction (automatic)

  2. Execute commands in order

  3. Apply styles (colors, thickness, point sizes)

  4. Start animation on the angle slider

  5. Auto-zoom and save .ggb + .png

Args: name: Mechanism name (used for filename) design_json: JSON string with design (see format above) output_dir: Output directory (default: current working directory)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
design_jsonYes
output_dirNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries full burden. It clearly describes the behavioral steps: new construction, command execution, style application, animation start, auto-zoom, and saving as .ggb and .png. This provides sufficient transparency for an agent, though some potential issues (e.g., error handling) are omitted.

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 long but well-structured with clear sections: general description, templates, JSON format, and workflow. It is front-loaded with purpose. While it could be trimmed slightly, the structure aids readability and earns its length.

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 (3 parameters, no output schema in input but description mentions output files), the description covers workflow, templates, and differentiation. It lacks mention of error handling or prerequisites, but overall is sufficiently complete for most use cases.

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 coverage is 0%, but the description compensates richly. It explains each parameter: 'name' for filename, 'design_json' with a full JSON format and templates, and 'output_dir' with default. The extensive examples and structure add critical meaning beyond the 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 starts with 'Create a complete mechanism: new construction → commands → styles → save .ggb + PNG', clearly stating the tool's purpose. It also distinguishes from sibling 'geogebra_batch' by specifying when to use this tool instead, fulfilling the differentiation criterion.

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 explicit guidance: 'Use geogebra_batch for commands instead of this tool unless you need one-step save.' It also outlines a detailed workflow. However, it does not cover scenarios where the tool should not be used beyond that, so it is not fully comprehensive.

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/123pc/Geogebra_mcp'

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