Skip to main content
Glama

Vibration modes of a polygonal drum

hear_the_shape
Read-onlyIdempotent

Compute 1–12 ideal fixed/free membrane modes for a simple polygon in metres using bounded P1 finite elements. Return upper bounds, extrapolated estimates and optional frequencies/shapes. Finite spectral agreement does not prove isospectrality; no damping. CPU, direct-only; no planner binding.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "polygon": "<polygon>"
    },
    "name": "hear_the_shape"
  }
}

Input Schema

NameRequiredDescriptionDefault
modesNoDefault 8, counted with multiplicity.
polygonYesVertices [x, y] in metres, either orientation; a repeated closing vertex is allowed. Must be simple.
boundaryNofixed (default): drumhead, TM waveguide. free: acoustic cavity, TE waveguide.
wave_speedNom/s; √(tension/areal density) for a membrane. Enables frequency_hz and notes.
compare_polygonNoOptional second shape: do the two drums sound the same?
include_mode_shapesNoAdds a ≤1024-triangle mesh with normalized mode values, for visualization.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "assumptions": {
      -      "items": {
      -        "maxLength": 512,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "maxItems": 16,
      -      "minItems": 1,
      -      "type": "array"
      -    },
      -    "boundary": {
      -      "anyOf": [
      -        {
      -          "const": "fixed",
      -          "type": "string"
      -        },
      -        {
      -          "const": "free",
      -          "type": "string"
      -        }
      -      ]
      -    },
      -    "compared_shape": {
      -      "anyOf": [
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "area": {
      -              "maximum": 1e+300,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "levels": {
      -              "items": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "first_eigenvalue": {
      -                    "maximum": 1e+300,
      -                    "minimum": -1e+300,
      -                    "type": "number"
      -                  },
      -                  "iterations": {
      -                    "maximum": 1000,
      -                    "minimum": 1,
      -                    "type": "integer"
      -                  },
      -                  "triangles": {
      -                    "maximum": 1000000,
      -                    "minimum": 1,
      -                    "type": "integer"
      -                  },
      -                  "unknowns": {
      -                    "maximum": 1000000,
      -                    "minimum": 1,
      -                    "type": "integer"
      -                  }
      -                },
      -                "required": [
      -                  "first_eigenvalue",
      -                  "iterations",
      -                  "triangles",
      -                  "unknowns"
      -                ],
      -                "type": "object"
      -              },
      -              "maxItems": 3,
      -              "minItems": 3,
      -              "type": "array"
      -            },
      -            "max_residual": {
      -              "maximum": 1e+300,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "mode_shapes": {
      -              "anyOf": [
      -                {
      -                  "additionalProperties": false,
      -                  "properties": {
      -                    "points": {
      -                      "items": {
      -                        "items": {
      -                          "maximum": 10000,
      -                          "minimum": -10000,
      -                          "type": "number"
      -                        },
      -                        "maxItems": 2,
      -                        "minItems": 2,
      -                        "type": "array"
      -                      },
      -                      "maxItems": 4096,
      -                      "minItems": 3,
      -                      "type": "array"
      -                    },
      -                    "triangles": {
      -                      "items": {
      -                        "items": {
      -                          "maximum": 4096,
      -                          "minimum": 0,
      -                          "type": "integer"
      -                        },
      -                        "maxItems": 3,
      -                        "minItems": 3,
      -                        "type": "array"
      -                      },
      -                      "maxItems": 1024,
      -                      "minItems": 1,
      -                      "type": "array"
      -                    },
      -                    "values": {
      -                      "items": {
      -                        "items": {
      -                          "maximum": 1,
      -                          "minimum": -1,
      -                          "type": "number"
      -                        },
      -                        "maxItems": 4096,
      -                        "minItems": 3,
      -                        "type": "array"
      -                      },
      -                      "maxItems": 12,
      -                      "minItems": 1,
      -                      "type": "array"
      -                    }
      -                  },
      -                  "required": [
      -                    "points",
      -                    "triangles",
      -                    "values"
      -                  ],
      -                  "type": "object"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "modes": {
      -              "items": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "courant_bound": {
      -                    "maximum": 12,
      -                    "minimum": 1,
      -                    "type": "integer"
      -                  },
      -                  "courant_respected": {
      -                    "type": "boolean"
      -                  },
      -                  "discretization_error_estimate": {
      -                    "maximum": 1e+300,
      -                    "minimum": 0,
      -                    "type": "number"
      -                  },
      -                  "eigenvalue": {
      -                    "maximum": 1e+300,
      -                    "minimum": -1e+300,
      -                    "type": "number"
      -                  },
      -                  "eigenvalue_upper_bound": {
      -                    "maximum": 1e+300,
      -                    "minimum": 0,
      -                    "type": "number"
      -                  },
      -                  "frequency_hz": {
      -                    "anyOf": [
      -                      {
      -                        "maximum": 1e+300,
      -                        "minimum": 0,
      -                        "type": "number"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "index": {
      -                    "maximum": 12,
      -                    "minimum": 1,
      -                    "type": "integer"
      -                  },
      -                  "multiplicity": {
      -                    "maximum": 12,
      -                    "minimum": 1,
      -                    "type": "integer"
      -                  },
      -                  "nodal_domains": {
      -                    "maximum": 1000000,
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  "note": {
      -                    "anyOf": [
      -                      {
      -                        "maxLength": 32,
      -                        "minLength": 1,
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "observed_order": {
      -                    "anyOf": [
      -                      {
      -                        "maximum": 4,
      -                        "minimum": 0.5,
      -                        "type": "number"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "ratio_to_fundamental": {
      -                    "anyOf": [
      -                      {
      -                        "maximum": 1e+300,
      -                        "minimum": 0,
      -                        "type": "number"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "residual": {
      -                    "maximum": 1e+300,
      -                    "minimum": 0,
      -                    "type": "number"
      -                  },
      -                  "wavenumber": {
      -                    "maximum": 1e+300,
      -                    "minimum": 0,
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "courant_bound",
      -                  "courant_respected",
      -                  "discretization_error_estimate",
      -                  "eigenvalue",
      -                  "eigenvalue_upper_bound",
      -                  "frequency_hz",
      -                  "index",
      -                  "multiplicity",
      -                  "nodal_domains",
      -                  "note",
      -                  "observed_order",
      -                  "ratio_to_fundamental",
      -                  "residual",
      -                  "wavenumber"
      -                ],
      -                "type": "object"
      -              },
      -              "maxItems": 12,
      -              "minItems": 1,
      -              "type": "array"
      -            },
      -            "perimeter": {
      -              "maximum": 1e+300,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "resolution_warning": {
      -              "anyOf": [
      -                {
      -                  "maxLength": 512,
      -                  "minLength": 1,
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "vertices": {
      -              "maximum": 64,
      -              "minimum": 3,
      -              "type": "integer"
      -            },
      -            "well_resolved_modes": {
      -              "maximum": 12,
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "weyl": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "computed_count": {
      -                  "maximum": 12,
      -                  "minimum": 1,
      -                  "type": "integer"
      -                },
      -                "eigenvalue": {
      -                  "maximum": 1e+300,
      -                  "minimum": -1e+300,
      -                  "type": "number"
      -                },
      -                "predicted_count": {
      -                  "maximum": 1e+300,
      -                  "minimum": -1e+300,
      -                  "type": "number"
      -                }
      -              },
      -              "required": [
      -                "computed_count",
      -                "eigenvalue",
      -                "predicted_count"
      -              ],
      -              "type": "object"
      -            }
      -          },
      -          "required": [
      -            "area",
      -            "levels",
      -            "max_residual",
      -            "mode_shapes",
      -            "modes",
      -            "perimeter",
      -            "resolution_warning",
      -            "vertices",
      -            "well_resolved_modes",
      -            "weyl"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "comparison": {
      -      "anyOf": [
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "area_relative_difference": {
      -              "maximum": 1,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "congruent": {
      -              "type": "boolean"
      -            },
      -            "first_differing_mode": {
      -              "anyOf": [
      -                {
      -                  "maximum": 12,
      -                  "minimum": 1,
      -                  "type": "integer"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "max_relative_difference": {
      -              "maximum": 1,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "perimeter_relative_difference": {
      -              "maximum": 1,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "verdict": {
      -              "anyOf": [
      -                {
      -                  "const": "congruent",
      -                  "type": "string"
      -                },
      -                {
      -                  "const": "spectra_differ",
      -                  "type": "string"
      -                },
      -                {
      -                  "const": "not_distinguished_at_this_resolution",
      -                  "type": "string"
      -                }
      -              ]
      -            }
      -          },
      -          "required": [
      -            "area_relative_difference",
      -            "congruent",
      -            "first_differing_mode",
      -            "max_relative_difference",
      -            "perimeter_relative_difference",
      -            "verdict"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "contract_version": {
      -      "const": "0.1.0",
      -      "type": "string"
      -    },
      -    "elapsed_ms": {
      -      "maximum": 1000000000000,
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "engine": {
      -      "const": "rust-cpu",
      -      "type": "string"
      -    },
      -    "method": {
      -      "maxLength": 1024,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "provenance": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "client": {
      -          "additionalProperties": {},
      -          "properties": {
      -            "name": {
      -              "type": "string"
      -            },
      -            "version": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "name",
      -            "version"
      -          ],
      -          "type": "object"
      -        },
      -        "identity_source": {
      -          "type": "string"
      -        },
      -        "model": {
      -          "type": "null"
      -        },
      -        "server": {
      -          "const": "scorecompute",
      -          "type": "string"
      -        },
      -        "tool": {
      -          "const": "hear_the_shape",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "tool",
      -        "server",
      -        "client",
      -        "identity_source",
      -        "model"
      -      ],
      -      "type": "object"
      -    },
      -    "shape": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "area": {
      -          "maximum": 1e+300,
      -          "minimum": 0,
      -          "type": "number"
      -        },
      -        "levels": {
      -          "items": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "first_eigenvalue": {
      -                "maximum": 1e+300,
      -                "minimum": -1e+300,
      -                "type": "number"
      -              },
      -              "iterations": {
      -                "maximum": 1000,
      -                "minimum": 1,
      -                "type": "integer"
      -              },
      -              "triangles": {
      -                "maximum": 1000000,
      -                "minimum": 1,
      -                "type": "integer"
      -              },
      -              "unknowns": {
      -                "maximum": 1000000,
      -                "minimum": 1,
      -                "type": "integer"
      -              }
      -            },
      -            "required": [
      -              "first_eigenvalue",
      -              "iterations",
      -              "triangles",
      -              "unknowns"
      -            ],
      -            "type": "object"
      -          },
      -          "maxItems": 3,
      -          "minItems": 3,
      -          "type": "array"
      -        },
      -        "max_residual": {
      -          "maximum": 1e+300,
      -          "minimum": 0,
      -          "type": "number"
      -        },
      -        "mode_shapes": {
      -          "anyOf": [
      -            {
      -              "additionalProperties": false,
      -              "properties": {
      -                "points": {
      -                  "items": {
      -                    "items": {
      -                      "maximum": 10000,
      -                      "minimum": -10000,
      -                      "type": "number"
      -                    },
      -                    "maxItems": 2,
      -                    "minItems": 2,
      -                    "type": "array"
      -                  },
      -                  "maxItems": 4096,
      -                  "minItems": 3,
      -                  "type": "array"
      -                },
      -                "triangles": {
      -                  "items": {
      -                    "items": {
      -                      "maximum": 4096,
      -                      "minimum": 0,
      -                      "type": "integer"
      -                    },
      -                    "maxItems": 3,
      -                    "minItems": 3,
      -                    "type": "array"
      -                  },
      -                  "maxItems": 1024,
      -                  "minItems": 1,
      -                  "type": "array"
      -                },
      -                "values": {
      -                  "items": {
      -                    "items": {
      -                      "maximum": 1,
      -                      "minimum": -1,
      -                      "type": "number"
      -                    },
      -                    "maxItems": 4096,
      -                    "minItems": 3,
      -                    "type": "array"
      -                  },
      -                  "maxItems": 12,
      -                  "minItems": 1,
      -                  "type": "array"
      -                }
      -              },
      -              "required": [
      -                "points",
      -                "triangles",
      -                "values"
      -              ],
      -              "type": "object"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "modes": {
      -          "items": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "courant_bound": {
      -                "maximum": 12,
      -                "minimum": 1,
      -                "type": "integer"
      -              },
      -              "courant_respected": {
      -                "type": "boolean"
      -              },
      -              "discretization_error_estimate": {
      -                "maximum": 1e+300,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              "eigenvalue": {
      -                "maximum": 1e+300,
      -                "minimum": -1e+300,
      -                "type": "number"
      -              },
      -              "eigenvalue_upper_bound": {
      -                "maximum": 1e+300,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              "frequency_hz": {
      -                "anyOf": [
      -                  {
      -                    "maximum": 1e+300,
      -                    "minimum": 0,
      -                    "type": "number"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "index": {
      -                "maximum": 12,
      -                "minimum": 1,
      -                "type": "integer"
      -              },
      -              "multiplicity": {
      -                "maximum": 12,
      -                "minimum": 1,
      -                "type": "integer"
      -              },
      -              "nodal_domains": {
      -                "maximum": 1000000,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "note": {
      -                "anyOf": [
      -                  {
      -                    "maxLength": 32,
      -                    "minLength": 1,
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "observed_order": {
      -                "anyOf": [
      -                  {
      -                    "maximum": 4,
      -                    "minimum": 0.5,
      -                    "type": "number"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "ratio_to_fundamental": {
      -                "anyOf": [
      -                  {
      -                    "maximum": 1e+300,
      -                    "minimum": 0,
      -                    "type": "number"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "residual": {
      -                "maximum": 1e+300,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              "wavenumber": {
      -                "maximum": 1e+300,
      -                "minimum": 0,
      -                "type": "number"
      -              }
      -            },
      -            "required": [
      -              "courant_bound",
      -              "courant_respected",
      -              "discretization_error_estimate",
      -              "eigenvalue",
      -              "eigenvalue_upper_bound",
      -              "frequency_hz",
      -              "index",
      -              "multiplicity",
      -              "nodal_domains",
      -              "note",
      -              "observed_order",
      -              "ratio_to_fundamental",
      -              "residual",
      -              "wavenumber"
      -            ],
      -            "type": "object"
      -          },
      -          "maxItems": 12,
      -          "minItems": 1,
      -          "type": "array"
      -        },
      -        "perimeter": {
      -          "maximum": 1e+300,
      -          "minimum": 0,
      -          "type": "number"
      -        },
      -        "resolution_warning": {
      -          "anyOf": [
      -            {
      -              "maxLength": 512,
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "vertices": {
      -          "maximum": 64,
      -          "minimum": 3,
      -          "type": "integer"
      -        },
      -        "well_resolved_modes": {
      -          "maximum": 12,
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "weyl": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "computed_count": {
      -              "maximum": 12,
      -              "minimum": 1,
      -              "type": "integer"
      -            },
      -            "eigenvalue": {
      -              "maximum": 1e+300,
      -              "minimum": -1e+300,
      -              "type": "number"
      -            },
      -            "predicted_count": {
      -              "maximum": 1e+300,
      -              "minimum": -1e+300,
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "computed_count",
      -            "eigenvalue",
      -            "predicted_count"
      -          ],
      -          "type": "object"
      -        }
      -      },
      -      "required": [
      -        "area",
      -        "levels",
      -        "max_residual",
      -        "mode_shapes",
      -        "modes",
      -        "perimeter",
      -        "resolution_warning",
      -        "vertices",
      -        "well_resolved_modes",
      -        "weyl"
      -      ],
      -      "type": "object"
      -    },
      -    "statement": {
      -      "maxLength": 2048,
      -      "minLength": 1,
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "assumptions",
      -    "boundary",
      -    "compared_shape",
      -    "comparison",
      -    "contract_version",
      -    "elapsed_ms",
      -    "engine",
      -    "method",
      -    "shape",
      -    "statement",
      -    "provenance"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the read-only/idempotent/closed-world profile, and the description adds real behavioral context beyond them: results are upper bounds plus extrapolated estimates, damping is excluded, and finite spectral agreement does not establish isospectrality. It also flags execution traits (CPU, direct-only, no planner binding). It stops short of stating cost, convergence tolerance, or failure modes for a non-simple polygon.

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?

Four short clauses, front-loaded with the computation, then returns, then caveats. Dense but every clause carries information; the telegraphic 'CPU, direct-only; no planner binding' is terse to the point of being cryptic for an unfamiliar reader.

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

Completeness5/5

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

With no output schema, the description takes on the job of describing returns — upper bounds, extrapolated estimates, optional frequencies and mode shapes — and it does so. Accuracy caveats and the non-isospectrality warning cover the main interpretive risk for a numerical tool, so nothing essential for correct invocation is missing.

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 description coverage is 100%, so the baseline would be 3, but the description adds interpretation beyond the schema: the 1–12 cap is framed as a mode count, metres fixes geometric units, and the optional outputs (frequencies/shapes) are explained in terms of what they require (wave_speed enabling Hz). The isospectrality caveat gives compare_polygon meaning the schema alone does not convey.

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 and resource — computing 1–12 ideal fixed/free membrane modes of a simple polygon — plus the numerical method (bounded P1 finite elements) and unit convention (metres). An agent can distinguish this from a generic shape or simulation sibling without opening the schema.

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 boundary enum descriptions imply the physical contexts ('drumhead, TM waveguide' vs 'acoustic cavity, TE waveguide'), which is genuine usage guidance, and 'no planner binding' scopes it away from planning tools. But no sibling (e.g. shape_the_sound or the plan_* family) is named as an alternative, so selection between tools is inferred rather than stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources