Skip to main content
Glama
alma-corpus-mcp

alma-corpus-mcp

by adamzacharia

toomre_q

Computes the Toomre Q stability parameter for gas, stellar, Keplerian, or two-fluid disks to assess gravitational stability from surface density, velocity dispersion, and epicyclic frequency.

Instructions

Toomre Q stability parameter.

mode='gas': Q = sigma kappa / (pi G Sigma) (gas, Toomre 1964 fluid form). mode='stars': Q = sigma_R kappa / (3.36 G Sigma) (collisionless). mode='keplerian_disk': protoplanetary disk, Q = c_s Omega / (pi G Sigma) with Omega = kappa = sqrt(G M*/r^3) and c_s = sqrt(k T / (mu m_H)), mu default 2.3; needs m_star_msun, radius_au, temperature_k and a surface density. mode='two_fluid': Romeo and Wiegert 2011 with thickness corrections T = 0.8 + 0.7 sigma_z/sigma_R: 1/Q = W/(T_s Q_s) + 1/(T_g Q_g) if T_s Q_s >= T_g Q_g, else 1/(T_s Q_s) + W/(T_g Q_g), W = 2 sigma_s sigma_g / (sigma_s^2 + sigma_g^2), with Q_s = sigma_s kappa/(pi G Sigma_s) as in RW11. kappa: give kappa_kms_kpc, or rotation_velocity_kms and radius_kpc with kappa = epicyclic_a V/R with a = sqrt(2 (1 + dlnV/dlnR)): sqrt(2) for a flat curve, sqrt(3) for V ~ R^0.5, 2 for solid body. Limits: Sigma from dust or CO carries the conversion factor; thick or resolved-out emission makes Sigma a lower limit (Q an upper limit); observed dispersions include beam smearing; Q < 1-2 is not a sharp threshold.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "toomre_q"
  }
}

Input Schema

NameRequiredDescriptionDefault
muNo
modeNogas
radius_auNo
sigma_kmsNo
radius_kpcNo
epicyclic_aNo
m_star_msunNo
kappa_kms_kpcNo
temperature_kNo
sigma_star_kmsNo
sigma_z_over_r_gasNo
sigma_z_over_r_starNo
rotation_velocity_kmsNo
surface_density_g_cm2No
surface_density_msun_pc2No
surface_density_star_msun_pc2No

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden: it usefully discloses caveats (conversion factors, lower limits on Sigma making Q an upper limit, beam smearing, Q < 1-2 not being a sharp threshold), which is real behavioral value. But it omits what happens when required inputs are missing or how mode-specific parameters conflict, and gives no indication of the returned quantity's form.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but front-loaded: the generic statement comes first, then one clause per mode, then kappa derivation, then limits. Every sentence carries specification or caveat content with no filler.

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?

For a 16-parameter, no-annotation tool the description covers the physics, defaults, derivation paths, and caveats well, which is most of what an agent needs. It falls short on stating which parameter sets are required per mode (beyond keplerian_disk) and on indicating the return value, though a computed Q is the obvious output.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate, and it largely does: it defines mu (default 2.3), explains how kappa is obtained from kappa_kms_kpc or rotation_velocity_kms plus radius_kpc via the epicyclic_a factor with concrete values, and defines the thickness correction T = 0.8 + 0.7 sigma_z/sigma_R for the sigma_z_over_r defaults. The distinction between gas and stellar surface densities and the role of sigma_star_kms is only implied through the formulas.

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?

The description names the resource (Toomre Q stability parameter) and gives the defining formula for each mode, so an agent knows exactly what quantity is computed. It is clear apart from siblings such as virial_parameter or dynamical_mass, but it does not explicitly contrast with them.

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?

Mode selection is implied by each branch's stated applicability ('gas, Toomre 1964 fluid form', 'collisionless', 'protoplanetary disk', 'Romeo and Wiegert 2011'), and keplerian_disk states its required inputs. However there is no explicit when-to-use/when-not guidance and no statement of the requirements for gas, stars, or two_fluid modes.

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