Skip to main content
Glama
Ian3738
by Ian3738

frequency_table

Generates frequency tables for categorical variables, including cross-tabulations with counts and row percentages when a 'by' column is specified, for association testing.

Instructions

Frequency tables for categorical variables, or a cross-tabulation with counts and row percentages when by is given. Use test_categorical afterwards to test the association.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNoCross-tabulate each variable against this column.
dataYesDataset name in the session.
digitsNoDecimal places for percentages.
weightNoSampling weight column; cells become summed weights (population counts) instead of respondent counts.
variablesYesColumns to tabulate.
include_naNoShow a row for missing values.
sort_by_countNoOrder levels by descending frequency.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does disclose the key output behavior: frequency tables normally, and counts plus row percentages when `by` is given. However, it does not mention how missing values, sorting, or weighted counts affect the output, leaving some behavioral gaps beyond what the schema already states.

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 two sentences with no wasted words. It front-loads the core functionality first and adds the follow-up guidance second, making it easy for an agent to parse and act on quickly.

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 7-parameter schema, no output schema, and no annotations, the description provides the essential behavioral context for the tool's main purpose and output structure. It names the output format (frequency tables and row-percentage cross-tabulations) and connects to the relevant follow-up test, though it leaves minor details about edge cases to the schema.

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 baseline is 3 even without additional detail in the tool description. The description does add small semantic value by explaining that `by` changes the output to a cross-tabulation with row percentages, but it does not elaborate on the other parameters beyond their schema descriptions.

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 identifies the tool's function as generating frequency tables for categorical variables and cross-tabulations with counts and row percentages when `by` is supplied. It names the resource and scope, and implicitly positions itself relative to `test_categorical`, though it does not explicitly contrast with other statistical tools.

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

Usage Guidelines4/5

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

The description communicates the primary use case and gives a clear next-step recommendation ('Use `test_categorical` afterwards to test the association'), which is actionable context. It does not explicitly state when not to use this tool or name alternative tabulation tools, but the context is clear enough for a typical agent.

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

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/Ian3738/r-stats-mcp'

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