Skip to main content
Glama
seanshin0214

Dr. QuantMaster MCP Server

by seanshin0214

get_formula

Retrieve statistical formulas and LaTeX notation for quantitative research concepts like OLS estimators, DID models, and hypothesis tests.

Instructions

통계 수식 및 LaTeX 표기법 제공

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conceptYes개념 (예: ols_estimator, did_att, hausman_test)
formatNo출력 형식

Implementation Reference

  • The main handler function for the 'get_formula' tool. It retrieves predefined statistical formulas in LaTeX and/or text format based on the input 'concept' (e.g., 'ols_estimator', 'did_att'). Returns the formula or an error if not found.
    function handleGetFormula(args: Record<string, unknown>) {
      const concept = args.concept as string;
      const format = (args.format as string) || "both";
    
      const formulas: Record<string, any> = {
        ols_estimator: {
          latex: "\\hat{\\beta} = (X'X)^{-1}X'Y",
          text: "β̂ = (X'X)⁻¹X'Y"
        },
        did_att: {
          latex: "\\text{ATT} = (\\bar{Y}_{T,post} - \\bar{Y}_{T,pre}) - (\\bar{Y}_{C,post} - \\bar{Y}_{C,pre})",
          text: "ATT = (Ȳ_T,post - Ȳ_T,pre) - (Ȳ_C,post - Ȳ_C,pre)"
        },
        hausman_test: {
          latex: "H = (\\hat{\\beta}_{FE} - \\hat{\\beta}_{RE})'[Var(\\hat{\\beta}_{FE}) - Var(\\hat{\\beta}_{RE})]^{-1}(\\hat{\\beta}_{FE} - \\hat{\\beta}_{RE})",
          text: "H = (β̂_FE - β̂_RE)'[Var(β̂_FE) - Var(β̂_RE)]⁻¹(β̂_FE - β̂_RE) ~ χ²(k)"
        },
        cohens_d: {
          latex: "d = \\frac{\\bar{X}_1 - \\bar{X}_2}{S_{pooled}}",
          text: "d = (X̄₁ - X̄₂) / S_pooled"
        },
        r_squared: {
          latex: "R^2 = 1 - \\frac{SS_{res}}{SS_{tot}} = 1 - \\frac{\\sum(y_i - \\hat{y}_i)^2}{\\sum(y_i - \\bar{y})^2}",
          text: "R² = 1 - (SS_res / SS_tot)"
        }
      };
    
      const formula = formulas[concept.toLowerCase()];
    
      if (!formula) {
        return { concept, error: "Formula not found. Try: ols_estimator, did_att, hausman_test, cohens_d, r_squared" };
      }
    
      if (format === "latex") return { concept, latex: formula.latex };
      if (format === "text") return { concept, text: formula.text };
      return { concept, ...formula };
    }
  • The input schema definition for the 'get_formula' tool, specifying the expected parameters: 'concept' (required string) and optional 'format' (latex, text, or both).
      name: "get_formula",
      description: "통계 수식 및 LaTeX 표기법 제공",
      inputSchema: {
        type: "object",
        properties: {
          concept: { type: "string", description: "개념 (예: ols_estimator, did_att, hausman_test)" },
          format: { type: "string", enum: ["latex", "text", "both"], description: "출력 형식" },
        },
        required: ["concept"],
      },
    },
  • The switch case in handleToolCall that registers and routes calls to the 'get_formula' handler function.
    case "get_formula":
      return handleGetFormula(args);
Behavior2/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 of behavioral disclosure. It states the tool 'provides' formulas and LaTeX notation, implying a read-only operation, but doesn't clarify aspects like whether it requires authentication, has rate limits, returns structured data, or handles errors. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

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 extremely concise—a single phrase in Korean that directly states the tool's function without any fluff. It is front-loaded with the core purpose and wastes no words, making it easy for an agent to parse quickly. Every part of the description earns its place by clearly conveying the essential 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?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits, usage context, and output expectations. Without annotations or an output schema, the agent must rely heavily on the schema for parameters and guesswork for behavior, leaving room for misinterpretation in operational scenarios.

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?

The schema description coverage is 100%, with clear descriptions for both parameters: 'concept' (e.g., ols_estimator, did_att) and 'format' (output format as latex, text, or both). The description adds no additional parameter semantics beyond what the schema provides, such as examples of other concepts or details on output formatting. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 clearly states the tool's purpose: '통계 수식 및 LaTeX 표기법 제공' (provides statistical formulas and LaTeX notation). It specifies both the resource (statistical formulas) and the format (LaTeX notation), making it distinct from most siblings that focus on analysis, code generation, or guidance rather than formula retrieval. However, it doesn't explicitly differentiate from potential formula-related siblings like 'get_method_guide' or 'meta_code', which slightly limits specificity.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, exclusions, or specific contexts for usage. Given the many siblings (e.g., 'search_stats_knowledge', 'get_method_guide', 'code_template'), the lack of differentiation leaves the agent to infer usage based on the name alone, which is insufficient for optimal tool selection.

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/seanshin0214/quantmaster-mcp-server'

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