eggsact 1.2.7

Deterministic MCP and in-process utility tools for coding agents
Documentation
use crate::mcp::registry::{ToolCost, ToolExposure, ToolSpec, ToolStability};
use crate::mcp::schemas::*;
use crate::tools::*;

pub const MATH_TOOLS: &[ToolSpec] = &[
    ToolSpec {
        name: "math_eval",
        description: "Evaluate arithmetic, unit conversions, constants, and scientific expressions deterministically. State-mutating functions (setvar, store, etc.) and non-deterministic functions (random, randint, gauss, etc.) are disabled. Use for math and unit tasks instead of asking the model to calculate.",
        handler: math_eval,
        input_schema: math_eval_input,
        output_schema: math_eval_output,
        category: "math",
        tier: 0,
        profiles: &["full", "default", "human_math"],
        tags: &["math", "evaluation", "arithmetic", "units", "constants"],
        exposure: ToolExposure::Default,
        harness_use: &["none"],
        aliases: &[],
        cost: ToolCost::Moderate,
        stability: ToolStability::Stable,
        composite: false,
    },
    ToolSpec {
        name: "unit_convert",
        description: "Convert a numeric value from one unit to another using pre-defined conversion factors.",
        handler: unit_convert,
        input_schema: unit_convert_input,
        output_schema: unit_convert_output,
        category: "math",
        tier: 2,
        profiles: &["full", "human_math"],
        tags: &["math", "units", "conversion"],
        exposure: ToolExposure::Contextual,
        harness_use: &["none"],
        aliases: &[],
        cost: ToolCost::Cheap,
        stability: ToolStability::Stable,
        composite: false,
    },
    ToolSpec {
        name: "unit_info",
        description: "Get information about a unit including its canonical form and category.",
        handler: unit_info,
        input_schema: unit_info_input,
        output_schema: unit_info_output,
        category: "math",
        tier: 2,
        profiles: &["full", "human_math"],
        tags: &["math", "units", "information"],
        exposure: ToolExposure::Contextual,
        harness_use: &["none"],
        aliases: &[],
        cost: ToolCost::Cheap,
        stability: ToolStability::Stable,
        composite: false,
    },
    ToolSpec {
        name: "constant_lookup",
        description: "Look up physical constant values and symbols (Avogadro, Planck, speed of light, etc.).",
        handler: constant_lookup,
        input_schema: constant_lookup_input,
        output_schema: constant_lookup_output,
        category: "math",
        tier: 2,
        profiles: &["full", "human_math"],
        tags: &["math", "constants", "physics", "lookup"],
        exposure: ToolExposure::Contextual,
        harness_use: &["none"],
        aliases: &[],
        cost: ToolCost::Cheap,
        stability: ToolStability::Stable,
        composite: false,
    },
];