Skip to main content
Glama
CalcsLive

CalcsLive MCP Server

by CalcsLive

calcslive_validate

Validate calculation articles to identify available inputs and outputs with their units before performing calculations. Use this tool to understand required parameters and their measurement options.

Instructions

Discover available inputs and outputs for a calculation article. Use this before calculate to understand what parameters are available and their units. Returns article metadata including all input/output PQs with descriptions, units, and available unit options.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
articleIdYesArticle Short ID to validate (e.g., 'hydro-power-calc')

Implementation Reference

  • Handler for the calcslive_validate tool: sends a GET request to the CalcsLive API validate endpoint and returns the article metadata as formatted JSON content.
    if (request.params.name === "calcslive_validate") {
      const { articleId } = request.params.arguments as any;
    
      try {
        const response = await fetch(
          `${CALCSLIVE_API_BASE}/api/v1/validate?articleId=${articleId}&apiKey=${API_KEY}`
        );
    
        if (!response.ok) {
          const errorData = await response.json() as any;
          throw new Error(errorData.error?.message || `API error: ${response.status}`);
        }
    
        const result = await response.json() as any;
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result.data.article, null, 2),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: "text",
              text: `Error validating article: ${error.message}`,
            },
          ],
          isError: true,
        };
      }
    }
  • src/index.ts:169-181 (registration)
    Tool registration in listTools handler, defining name, description, and input schema for calcslive_validate.
      name: "calcslive_validate",
      description: "Discover available inputs and outputs for a calculation article. Use this before calculate to understand what parameters are available and their units. Returns article metadata including all input/output PQs with descriptions, units, and available unit options.",
      inputSchema: {
        type: "object",
        properties: {
          articleId: {
            type: "string",
            description: "Article Short ID to validate (e.g., 'hydro-power-calc')"
          }
        },
        required: ["articleId"]
      }
    }
  • Input schema definition for the calcslive_validate tool.
    inputSchema: {
      type: "object",
      properties: {
        articleId: {
          type: "string",
          description: "Article Short ID to validate (e.g., 'hydro-power-calc')"
        }
      },
      required: ["articleId"]
    }
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 describes the return content (metadata with PQs, descriptions, units) but lacks details on error handling, rate limits, or authentication needs. It adds some behavioral context but not comprehensively.

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 front-loaded with the main purpose, followed by usage context and return details in two efficient sentences. Every sentence adds value without redundancy.

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?

Given the simple single-parameter input and no output schema, the description adequately covers purpose, usage, and return format. However, as a tool with no annotations, it could benefit from more behavioral details like error cases or permissions.

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 coverage is 100%, so the schema already documents the single parameter 'articleId' with description and type. The description adds no additional parameter semantics beyond implying it's used for validation, aligning with the baseline for high schema coverage.

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 purpose with specific verbs ('discover available inputs and outputs') and resource ('calculation article'), and distinguishes it from sibling tools by explicitly mentioning its preparatory role before 'calculate'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides explicit guidance on when to use this tool ('before calculate to understand what parameters are available') and names an alternative ('calculate'), making it clear this is for discovery rather than execution.

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/CalcsLive/calcslive-mcp-server'

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