Skip to main content
Glama

extract_symbols

Parse math expressions to extract symbols with inferred type, SI unit, and description using optional context hints.

Instructions

    Extract symbols from an expression with inferred metadata.

    Args:
        expression: Mathematical expression
        context: Optional context hint (e.g., "mechanics", "thermodynamics")

    Returns:
        List of symbols with:
        - name: Symbol name
        - type: Inferred type (real, positive_real, integer, etc.)
        - suggested_unit: Suggested SI unit based on context
        - description: Inferred description

    Examples:
        extract_symbols("F = m*a", context="mechanics")
        → [
            {"name": "F", "type": "real", "suggested_unit": "N", "description": "Force"},
            {"name": "m", "type": "positive_real", "suggested_unit": "kg", "description": "Mass"},
            {"name": "a", "type": "real", "suggested_unit": "m/s²", "description": "Acceleration"}
          ]
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextNo
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the return structure and gives an example, but it does not explicitly state that the tool is read-only, how it handles invalid expressions, or other side effects. It adds some behavioral context but not comprehensive detail.

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?

The description is well-structured with Args, Returns, and an Example section, and each part contributes value. It is concise with no filler, though there is a minor typo in the example ('ssggested_unit') that could cause minor confusion but does not detract from overall structure.

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?

Given the low complexity (2 parameters, no annotations), the description is sufficiently complete. It covers the function, inputs, output structure, and includes an illustrative example. This provides an agent enough information to invoke the tool correctly.

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?

The schema has no descriptions for parameters (0% coverage), but the description compensates by explaining 'expression' as a mathematical expression and 'context' with examples like 'mechanics' and 'thermodynamics.' It also shows how context influences suggested units, adding meaning beyond the schema.

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?

The description clearly states the tool's action: 'Extract symbols from an expression with inferred metadata.' This is a specific verb+resource that distinguishes it from sibling tools like parse_expression or validate_expression. The example further clarifies the output, showing symbol names, types, units, and descriptions.

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 description implies usage through its purpose and example, but it does not explicitly state when to use this tool versus alternatives. It gives a context parameter with examples but no exclusions or when-not-to-use guidance. The usage context is implied rather than explicit.

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

Install Server

Other Tools

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/u9401066/nsforge-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server