Skip to main content
Glama

Get runnable R, Python, or Julia code

get_code
Read-onlyIdempotent

Get runnable code from the library for a specific statistical, econometric, causal inference, or machine learning task, in R, Python, or Julia. Suited to requests for code that carries out a named estimator, test, or modeling step; it returns code with brief context, not an explanation of the method. Results can be restricted to one language or one work. Returns code blocks with the section they come from, the packages they use, a link, and a citation.

Input 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); advanced_data_analysis (Advanced Data Analysis); tidy_finance_vn (Applying Tidy Finance with Python to Vietnam); tidy_finance_vn_vi (Tài Chính Ứng Dụng với Python); mlpy (Machine Learning in Python); social_theory (Social Science Theory: A Field Guide to the Theories, Effects, and Frameworks Behind Research and Business); publications (Research Articles and Publications).
languageNoProgramming language of the code: r, python, or julia.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / source / description
      Previous value: -"Limit 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); advanced_data_analysis (Advanced Data Analysis); tidy_finance_vn (Applying Tidy Finance with Python to Vietnam); tidy_finance_vn_vi (Tài Chính Ứng Dụng với Python); mlpy (Machine Learning in Python); publications (Research Articles and Publications)."New value: +"Limit 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); advanced_data_analysis (Advanced Data Analysis); tidy_finance_vn (Applying Tidy Finance with Python to Vietnam); tidy_finance_vn_vi (Tài Chính Ứng Dụng với Python); mlpy (Machine Learning in Python); social_theory (Social Science Theory: A Field Guide to the Theories, Effects, and Frameworks Behind Research and Business); publications (Research Articles and Publications)."
    • changedInput schema / properties / source / enum
      Previous value: -[
      -  "data_analysis",
      -  "causalverse",
      -  "credit_score",
      -  "marketing_research",
      -  "ai_in_action",
      -  "advanced_data_analysis",
      -  "tidy_finance_vn",
      -  "tidy_finance_vn_vi",
      -  "mlpy",
      -  "publications"
      -]New value: +[
      +  "data_analysis",
      +  "causalverse",
      +  "credit_score",
      +  "marketing_research",
      +  "ai_in_action",
      +  "advanced_data_analysis",
      +  "tidy_finance_vn",
      +  "tidy_finance_vn_vi",
      +  "mlpy",
      +  "social_theory",
      +  "publications"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / source / description
      Previous value: -"Limit 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); advanced_data_analysis (Advanced Data Analysis); tidy_finance_vn (Applying Tidy Finance with Python to Vietnam); tidy_finance_vn_vi (Tài Chính Ứng Dụng với Python); mlpy (Machine Learning in Python); comm_theory (Communication Theory); publications (Research Articles and Publications)."New value: +"Limit 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); advanced_data_analysis (Advanced Data Analysis); tidy_finance_vn (Applying Tidy Finance with Python to Vietnam); tidy_finance_vn_vi (Tài Chính Ứng Dụng với Python); mlpy (Machine Learning in Python); publications (Research Articles and Publications)."
    • changedInput schema / properties / source / enum
      Previous value: -[
      -  "data_analysis",
      -  "causalverse",
      -  "credit_score",
      -  "marketing_research",
      -  "ai_in_action",
      -  "advanced_data_analysis",
      -  "tidy_finance_vn",
      -  "tidy_finance_vn_vi",
      -  "mlpy",
      -  "comm_theory",
      -  "publications"
      -]New value: +[
      +  "data_analysis",
      +  "causalverse",
      +  "credit_score",
      +  "marketing_research",
      +  "ai_in_action",
      +  "advanced_data_analysis",
      +  "tidy_finance_vn",
      +  "tidy_finance_vn_vi",
      +  "mlpy",
      +  "publications"
      +]
  3. Changed2 schema fields changed
    • changedInput schema / properties / source / description
      Previous value: -"Limit 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); publications (Research Articles and Publications)."New value: +"Limit 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); advanced_data_analysis (Advanced Data Analysis); tidy_finance_vn (Applying Tidy Finance with Python to Vietnam); tidy_finance_vn_vi (Tài Chính Ứng Dụng với Python); mlpy (Machine Learning in Python); comm_theory (Communication Theory); publications (Research Articles and Publications)."
    • changedInput schema / properties / source / enum
      Previous value: -[
      -  "data_analysis",
      -  "causalverse",
      -  "credit_score",
      -  "marketing_research",
      -  "ai_in_action",
      -  "publications"
      -]New value: +[
      +  "data_analysis",
      +  "causalverse",
      +  "credit_score",
      +  "marketing_research",
      +  "ai_in_action",
      +  "advanced_data_analysis",
      +  "tidy_finance_vn",
      +  "tidy_finance_vn_vi",
      +  "mlpy",
      +  "comm_theory",
      +  "publications"
      +]
  4. Changed2 schema fields changed
    • changedInput schema / properties / source / description
      Previous value: -"Limit 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)."New value: +"Limit 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); publications (Research Articles and Publications)."
    • changedInput schema / properties / source / enum
      Previous value: -[
      -  "data_analysis",
      -  "causalverse",
      -  "credit_score",
      -  "marketing_research",
      -  "ai_in_action"
      -]New value: +[
      +  "data_analysis",
      +  "causalverse",
      +  "credit_score",
      +  "marketing_research",
      +  "ai_in_action",
      +  "publications"
      +]
  5. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world behavior, so the safety profile is covered. The description adds valuable return-shape context — code blocks with originating section, packages used, a link, and a citation — which is behavior not captured by annotations. Lacks rate/pagination detail.

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?

Front-loads the core verb and resource in the first sentence, then layers in scope and return details. Slightly verbose with four sentences, but each adds distinct information without repetition.

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 supplies the return format (code blocks with section, packages, link, citation), and annotations cover the safety profile, so an agent has what it needs to call the tool correctly. Minor gaps around pagination/limit behavior remain but are low-impact.

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 coverage is 100%, so the schema already documents topic, limit, source, and language thoroughly. The description only lightly reinforces this ('Results can be restricted to one language or one work'), adding little beyond the enum descriptions already present.

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?

States a specific verb and resource ('Get runnable code from the library') with a clear domain (statistical, econometric, causal inference, ML tasks) and languages. It also differentiates itself from an explanation-oriented sibling by noting it returns 'code with brief context, not an explanation of the method,' though it never names that sibling explicitly.

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?

Gives a clear usage condition ('Suited to requests for code that carries out a named estimator, test, or modeling step') and an implicit exclusion ('not an explanation of the method'), which steers an agent toward this tool for concrete code rather than method explanations. It stops short of naming the alternative tool.

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.