Skip to main content
Glama
seanshin0214

Dr. QuantMaster MCP Server

by seanshin0214

calc_effect_size

Calculate and interpret statistical effect sizes including Cohen's d, η², f², odds ratio, and correlation for quantitative research analysis.

Instructions

효과크기 계산 및 해석 (Cohen's d, η², f², OR, RR)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes효과크기 유형
valuesYes계산에 필요한 값들

Implementation Reference

  • The handler function that executes the calc_effect_size tool logic, computing various effect sizes (Cohen's d, eta², f², OR) based on input type and values, with interpretations.
    function handleCalcEffectSize(args: Record<string, unknown>) {
      const type = args.type as string;
      const values = args.values as Record<string, number>;
    
      let result: any = { type };
    
      switch (type) {
        case "cohens_d":
          if (values.mean1 && values.mean2 && values.sd_pooled) {
            result.effect_size = ((values.mean1 - values.mean2) / values.sd_pooled).toFixed(3);
          } else if (values.t && values.n1 && values.n2) {
            result.effect_size = (values.t * Math.sqrt((values.n1 + values.n2) / (values.n1 * values.n2))).toFixed(3);
          }
          result.interpretation = {
            small: "0.2", medium: "0.5", large: "0.8"
          };
          break;
        case "eta_squared":
          if (values.ss_effect && values.ss_total) {
            result.effect_size = (values.ss_effect / values.ss_total).toFixed(3);
          }
          result.interpretation = {
            small: "0.01", medium: "0.06", large: "0.14"
          };
          break;
        case "f_squared":
          if (values.r_squared) {
            result.effect_size = (values.r_squared / (1 - values.r_squared)).toFixed(3);
          }
          result.interpretation = {
            small: "0.02", medium: "0.15", large: "0.35"
          };
          break;
        case "odds_ratio":
          if (values.or) {
            result.effect_size = values.or;
            result.cohens_d_approx = (Math.log(values.or) * Math.sqrt(3) / Math.PI).toFixed(3);
          }
          break;
      }
    
      return result;
    }
  • Input schema definition for the calc_effect_size tool, specifying the type enum and values object.
    inputSchema: {
      type: "object",
      properties: {
        type: {
          type: "string",
          enum: ["cohens_d", "eta_squared", "f_squared", "odds_ratio", "correlation"],
          description: "효과크기 유형"
        },
        values: { type: "object", description: "계산에 필요한 값들" },
      },
      required: ["type", "values"],
    },
  • Registration of the calc_effect_size tool in the exported tools array.
      name: "calc_effect_size",
      description: "효과크기 계산 및 해석 (Cohen's d, η², f², OR, RR)",
      inputSchema: {
        type: "object",
        properties: {
          type: {
            type: "string",
            enum: ["cohens_d", "eta_squared", "f_squared", "odds_ratio", "correlation"],
            description: "효과크기 유형"
          },
          values: { type: "object", description: "계산에 필요한 값들" },
        },
        required: ["type", "values"],
      },
    },
  • Dispatch case in handleToolCall function that routes calls to the effect size handler.
    case "calc_effect_size":
      return handleCalcEffectSize(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 mentions '계산 및 해석' (calculation and interpretation), implying it performs computations and provides insights, but fails to describe critical behaviors like input validation, error handling, output format, or computational limits. For a tool with no annotations, this is a significant gap in transparency.

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 listing the tool's function and examples. It is front-loaded with the core purpose and wastes no words, making it efficient for quick understanding without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a nested 'values' parameter, the description is incomplete. It does not explain how to structure the 'values' object, what the tool returns, or any behavioral aspects like error cases. For a computational tool with complex inputs, this leaves too many gaps for effective use.

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 100%, so the schema already documents the two parameters ('type' with enum and 'values' as an object). The description lists effect size types (e.g., Cohen's d, η²) which align with the 'type' enum, adding some context, but does not explain the structure or content of the 'values' object. Baseline 3 is appropriate as the schema does the heavy lifting.

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: '효과크기 계산 및 해석' (effect size calculation and interpretation) with specific examples (Cohen's d, η², f², OR, RR). It uses a specific verb ('계산 및 해석') and resource ('효과크기'), but does not explicitly distinguish it from sibling tools like 'meta_effect_size' or 'interpret_coefficient', which might have overlapping functions.

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 lists effect size types but does not specify contexts, prerequisites, or compare to sibling tools such as 'meta_effect_size' for meta-analysis or 'interpret_coefficient' for interpretation. This lack of usage context leaves the agent without clear direction.

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