Skip to main content
Glama
Ian3738
by Ian3738

factor_analysis

Run factor analysis or PCA with KMO, Bartlett's test, parallel analysis, rotated loadings, communalities, variance, scree plot, and cross-loading detection.

Instructions

Exploratory factor analysis or principal component analysis. Reports KMO sampling adequacy, Bartlett's test of sphericity, the number of factors suggested by parallel analysis and by the Kaiser criterion, the rotated loading matrix with communalities, variance accounted for, a scree plot, and a list of items that cross-load or fail to load. Leave n_factors empty to use the parallel-analysis suggestion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesDataset name in the session.
typeNo'efa' for factor analysis or 'pca' for principal components.efa
plotsNoInclude a scree plot.
cutoffNoLoadings below this absolute value are hidden.
digitsNoDecimal places.
methodNoExtraction method for EFA: minres, ml, pa or wls.minres
save_asNoName for the solution in the session.
rotationNooblimin, promax, varimax, quartimax or none. Oblique rotations allow correlated factors.oblimin
n_factorsNoNumber of factors to extract; omit to let parallel analysis decide.
variablesNoItem columns (default: all numeric).

Schema Changelog

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

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does substantial work: it lists the statistical outputs and discloses that omitting n_factors uses the parallel-analysis suggestion. It does not cover data requirements, missing-data handling, or what saving a solution implies, but the disclosed behavior is already rich.

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?

Three sentences each serve a distinct purpose: naming the analysis type, listing the output bundle, and clarifying the key n_factors default behavior. No filler or redundant restatement of the schema.

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?

For a complex 10-parameter tool with no output schema, the description is quite complete: it covers the analysis family, major results, and the critical default-selection behavior. Minor gaps remain around data preparation, side effects of save_as, and the exact result object structure, but the essentials for correct invocation are present.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds value beyond parameter names by explaining that leaving n_factors empty invokes the parallel-analysis suggestion and by framing the type parameter as EFA vs PCA.

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 identifies the tool as exploratory factor analysis or principal component analysis, and enumerates a specific set of outputs (KMO, Bartlett's test, loading matrix, communalities, variance, scree plot, cross-loading items). This distinguishes it from sibling statistics tools, none of which offer EFA/PCA.

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 when to use the tool (dimension reduction/construct exploration) but provides no explicit when-to-use or when-not-to-use guidance and names no alternatives. The only usage directive is parameter-level advice about leaving n_factors empty, not tool selection guidance.

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