Skip to main content
Glama
123pc
by 123pc

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GEOGEBRA_BACKENDNoBackend selection: auto (prefer Web), web, desktopauto
GEOGEBRA_CDP_PORTNoDesktop backend CDP remote debugging port9222
GEOGEBRA_WEB_WIDTHNoWeb Runtime viewport width1200
GEOGEBRA_WEB_BUNDLENoWeb Runtime bundle loading: cdn (online) or local (offline bundle)cdn
GEOGEBRA_WEB_HEIGHTNoWeb Runtime viewport height800
GEOGEBRA_WEB_HEADLESSNoWeb Runtime headless mode: 1=yes, 0=show browser window1
GEOGEBRA_WEB_BUNDLE_PATHNoOffline bundle cache directory (overrides default path)platform default
GEOGEBRA_RESTART_EXISTINGNoDesktop backend: set to 1 to allow auto-restart of existing GeoGebra0

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
geogebra_execA

Execute a GeoGebra command. To make a mechanism MOVE (animate), you MUST create an angle slider and define points that depend on it.

── COMMAND REFERENCE ──

POINTS: A = (x, y) — free point A = (3, 4) M = Midpoint(A, B) — midpoint P = Point(c, 0.5) — point on curve c at parameter 0..1

ANGLE SLIDER (the KEY to animation): α = 30° — creates an angle slider. ALWAYS start with this β = 60° — for mechanisms needing a second angle These become sliders. Use StartAnimation(α) to drive motion.

DEPENDENT POINTS (formulas using the angle): A = O1 + (rcos(α), rsin(α)) A = (rcos(α), rsin(α)) — same when O1 is origin X = (acos(α), bsin(α)) — ellipse motion These points MOVE when α changes. This is how animation works.

LINES & SEGMENTS: Line(A, B) — infinite line through A,B Segment(A, B) — segment between A,B Ray(A, B) — ray from A through B PerpendicularLine(A, l)— line through A ⟂ l ParallelLine(A, l) — line through A ∥ l

CIRCLES & ARCS: Circle(O, r) — circle center O radius r Circle(O, A) — circle center O through point A c = Circle(O1, 2) — name it 'c' to reuse

INTERSECTIONS (critical for mechanisms): P = Intersect(c1, c2) — all intersections P = Intersect(c1, c2, 1) — FIRST intersection (use 1 or 2) P = Intersect(c1, c2, 2) — SECOND intersection P = Intersect(Segment(A,B), c) — segment-circle intersection

ANGLES: Angle(A, O, B) — ∠AOB in degrees

SLIDER (numeric): r = 2 — creates a numeric slider if value is a plain number r = Slider(0, 5, 0.1) — explicit slider(min, max, step)

TRANSFORMATIONS: Rotate(A, α, O) — rotate A around O by angle α Dilate(A, s, O) — dilate A from O by factor s Translate(A, v) — translate A by vector v

ANIMATION: StartAnimation(α) — start the slider α animating StartAnimation() — start all sliders StopAnimation() — stop all animations SetAnimationSpeed(α, s) — set speed (0.1–10) After building the mechanism, always call StartAnimation(angle_label) and then geogebra_animate() for speed control.

MISC: ZoomIn(1) — zoom ZoomOut(1) — un-zoom Pan(x, y) — pan view

── CRITICAL RULES ──

  1. ALWAYS create an angle slider (eg α=30°) FIRST before dependent points

  2. Dependent points use cos(α), sin(α) — they move when α animates

  3. For linkages, define fixed pivots → slider → dependent points → segments

  4. Intersect() with index 1 or 2 picks WHICH intersection to use

  5. After all commands, call geogebra_animate() to start motion

Args: command: GeoGebra command string (see reference above)

geogebra_batchB

在 GeoGebra 中批量执行多条命令。适合一次性构建完整机构。

Args: commands_json: JSON 数组格式的命令列表, 如 '["A=(0,0)","B=(6,0)","Segment(A,B)"]'

geogebra_run_commandsA

Execute multiple GeoGebra commands from a structured list. Preferred over geogebra_batch for AI clients — no JSON string wrapping needed.

Args: commands: Ordered GeoGebra commands, e.g. ["A=(0,0)", "B=(6,0)", "Segment(A,B)"]

geogebra_new_constructionA

新建空白 GeoGebra 构造,清除当前所有对象。

geogebra_saveB

保存当前 GeoGebra 构造为 .ggb 文件。

Args: filepath: 保存路径, 如 "D:/tool/my_mechanism.ggb"

geogebra_export_pngB

导出当前 GeoGebra 视图为 PNG 截图。

Args: filepath: 保存路径, 如 "D:/tool/screenshot.png" scale: 缩放因子 (1-4, 默认2)

geogebra_versionA

返回 MCP Server 版本号。

geogebra_helpA

获取 GeoGebra 命令和机构设计的帮助。在构建机构之前先调用此工具。

Args: topic: "commands"=命令参考, "mechanisms"=机构模板, "animation"=动画, "all"=全部

geogebra_statusA

检查 GeoGebra 连接状态和当前构造信息。

geogebra_set_viewA

设置 GeoGebra 视图模式。

Args: perspective: "G"=几何, "A"=代数, "T"=表格, "3D"=三维, "AG"=代数+几何

geogebra_set_appearanceB

设置对象外观(颜色、线宽、点大小、可见性)。

Args: label: 对象标签名 color_r/g/b: RGB 颜色 0-1 (-1 不修改) thickness: 线宽 1-13 point_size: 点大小 1-9 visible: 是否可见 label_visible: 是否显示标签

geogebra_animateA

设置动画——让滑块控制的机构动起来。

Args: label: 滑块标签, 如 "α" animate: 是否启动动画 speed: 速度 (0.1-10)

geogebra_get_objectsA

获取当前构造中所有对象的名称列表。

geogebra_draw_mechanismA

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)

geogebra_create_constructionA

Create a construction from a structured design dict. Preferred over geogebra_draw_mechanism for AI clients — no JSON string wrapping needed.

design dict 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},...]}

Auto-behavior (no manual steps needed):

  • Auxiliary circles named c1, c2, c3... are automatically hidden.

  • The animation slider is auto-made visible and set to play.

  • Construction must use 'c1', 'c2' etc. for circles to be auto-hidden.

Args: name: Output filename stem design: Dict with perspective, commands, styles, animate, and speed output_dir: Output directory (default: cwd)

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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