Skip to main content
Glama

Research Methods Library

Get runnable R or Python code

get_code
Read-onlyIdempotent

Get runnable code from the library for a statistical, econometric, causal inference, or machine learning task, in R, Python, or Julia. Returns code blocks with the section they come from, the packages they use, a link, and a citation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of sections to return code from (default 4).
topicYesThe task, e.g. "Callaway and Sant'Anna group-time ATT", "rdrobust bandwidth", "WoE binning scorecard".
sourceNoLimit to one work: data_analysis (A Guide on Data Analysis); causalverse (causalverse: The All-in-One Causal Inference Toolkit); credit_score (Credit Scoring: Theory, Methods, and Practice); marketing_research (Marketing Research: A Technical and Academic Treatment); ai_in_action (AI in Action: A Reference for Artificial Intelligence).
languageNoProgramming language of the code: r, python, or julia.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly=true, idempotent=true, non-destructive, closed-world, so the safety profile is covered. The description still adds genuinely useful behavioral context absent from structured data: there is no output schema, yet it discloses the return shape (code blocks plus source section, packages used, link, and citation). It does not, however, mention result limits or behavior when no match is found.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose and followed immediately by the return contents; nothing is padded. It could be marginally tighter, but every clause conveys information.

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?

With no output schema, the description compensates by enumerating the return payload, and all four parameters are fully covered by the schema. The remaining gap is sibling differentiation (search/fetch overlap) and default/limit behavior, which keeps it just short of complete.

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 every parameter (topic, limit, source, language) is already documented in the schema, and the description adds only a marginal restatement of the supported languages. Baseline 3 applies when 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 names a concrete verb (get) and resource (runnable code from the library) and scopes it to statistical, econometric, causal inference, and ML tasks across R/Python/Julia. It is clearly not a generic search or fetch, but it never explicitly contrasts itself with the sibling 'search' tool, which an agent could plausibly reach for instead.

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?

There is no when-to-use/when-not guidance and no routing signal relative to siblings like search, fetch, or cite. The topic examples ('Callaway and Sant'Anna group-time ATT') hint at the intended query shape, but choosing this tool over 'search' is left entirely to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.