Skip to main content
Glama
alma-corpus-mcp

alma-corpus-mcp

by adamzacharia

fit_modified_blackbody

Fits a single-temperature modified blackbody to SED fluxes in GHz and mJy, returning dust mass, temperature, beta, and covariance errors for SED modeling.

Instructions

Fit a single-temperature modified blackbody to an SED (observed frequencies in GHz, fluxes in mJy).

form='thin': S = (1+z) M kappa(nu_rest) B(nu_rest,T) / D_L^2. form='general': S = (1+z) A (1 - exp(-tau)) B / D_L^2 with tau = (nu_rest/nu_0)^beta, nu_0 = c/lambda0_um, and A = M kappa(nu_0) (tau = 1 at lambda0 defines the area). The mass in this form depends on that area assumption. Free parameters: log10 M_dust (Msun), T_d (K), beta (unless fixed). Errors in quadrature with flux_cal_frac. L_IR is integrated over rest 8-1000 um (and L_FIR over 42.5-122.5 um) from the intrinsic B(T) model. cmb_contrast subtracts B(T_CMB(z)) (da Cunha 2013 contrast term only; T_d is then the heated temperature). Returns least-squares values with covariance errors; mcmc=True adds an emcee posterior (needs [fit] extra). Limits: one temperature misses cold dust mass; T and beta are degenerate; upper limits are not handled.

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": {
      "freq_ghz": "<freq_ghz>",
      "flux_mjy": "<flux_mjy>",
      "flux_err_mjy": "<flux_err_mjy>"
    },
    "name": "fit_modified_blackbody"
  }
}

Input Schema

NameRequiredDescriptionDefault
formNothin
mcmcNo
seedNo
nu0_ghzNo
fix_betaNo
flux_mjyYes
freq_ghzYes
redshiftNo
lambda0_umNo
mcmc_stepsNo
distance_pcNo
cmb_contrastNo
fix_t_dust_kNo
flux_err_mjyYes
kappa0_cm2_gNo
kappa_presetNogalaxy_850um
mcmc_walkersNo
flux_cal_fracNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does so well: it states returns are least-squares values with covariance errors, that mcmc=True adds an emcee posterior requiring the [fit] extra, that flux_cal_frac is added in quadrature, and that L_IR/L_FIR are integrated over stated rest-frame ranges. Remaining gaps are runtime cost and what happens when both redshift and distance_pc are absent.

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?

Front-loaded one-sentence purpose, then model equations, then free parameters, then return/error behavior, then limits — a logical ordering with no filler. It is dense with domain notation (M, D_L, kappa) that assumes prior knowledge, but each sentence contributes information.

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 an 18-parameter, no-annotation, no-output-schema tool, this is adequate but not complete: output contents are described generically ('least-squares values with covariance errors') without naming the returned fields, and roughly a third of the parameters are left undocumented. A user could not configure kappa or distance handling from the description alone.

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 description coverage is 0% across 18 parameters, so the description must compensate and it only partly does. It gives meaning for form, redshift (via 1+z and D_L), lambda0_um/nu0_ghz, fix_beta, fix_t_dust_k, flux_cal_frac and cmb_contrast, but seed, mcmc_steps, mcmc_walkers, kappa0_cm2_g, kappa_preset and distance_pc are never mentioned, and the kappa_preset default 'galaxy_850um' is unexplained.

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?

Opens with a precise verb+resource: 'Fit a single-temperature modified blackbody to an SED', then pins down inputs (GHz, mJy) and the two model variants with explicit equations. Read against siblings like dust_mass_from_flux or spectral_index, there is no ambiguity that this is the full SED-fitting tool rather than a single-band estimator.

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?

It distinguishes form='thin' from form='general' by meaning (the general form's mass depends on the tau=1 area assumption) and flags when mcmc=True is warranted and what extra it requires. The 'Limits' sentence supplies when-not-to-trust conditions (one temperature misses cold dust, T-beta degeneracy, no upper limits). It stops short of routing the agent to a specific sibling tool.

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