Skip to main content
Glama

Learn Python with Hypnotic Patterns

The Python script of a pattern

get_code
Read-only

The whole Python script of a pattern (numpy and matplotlib, under 80 lines), as the lesson and the site show it and as the site’s tests run it, with how to run it, what to change to see something new, and a Google Colab notebook to run it in a browser.

Input Schema

NameRequiredDescriptionDefault
langNoThe language of the answer: en (the default), pl; es, pt, fr, de, ja and ko for patterns and lessons (the course stays in English there)
patternYesThe pattern (its slug), as list_patterns gives it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and closed-world behavior, so the bar is lower, and the description still adds real content: the script is short, uses numpy and matplotlib, is test-verified, and comes with execution instructions and a browser-runnable Colab notebook. It does not discuss localization of the returned script, which is the main unstated behavior.

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?

It is a single sentence with the resource front-loaded and no filler. The stacked clause 'as the lesson and the site show it and as the site's tests run it' is slightly redundant, which keeps it from a 5.

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 carries the burden of describing the return value, and it does so concretely: script body plus run steps, modification hints, and a Colab link. The only gap is how the lang parameter affects the script and accompanying text.

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%, and both parameters are enums fully documented in the schema, so the baseline of 3 applies. The description adds nothing about the lang parameter or which pattern slugs exist, leaving the schema to carry that load.

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 specific resource (the whole Python script of a pattern, numpy/matplotlib, under 80 lines) and lists the bundled extras (run instructions, tweak guidance, Colab notebook). This clearly separates it from get_lesson and list_patterns, though it never names those siblings explicitly.

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?

Usage is only implied: an agent can infer this is the tool for full runnable code as opposed to lesson prose or concept explanations. There is no explicit when-to-use statement, no guidance on pairing it with get_lesson, and no exclusions.

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.

Resources