Skip to main content
Glama

get_example

Read-only

Retrieve runnable, GPU-verified example code and known pitfalls for the CuPy or nvmath-python APIs most relevant to a described task.

Instructions

Get runnable, GPU-verified example code (with pitfalls) for the curated APIs most relevant to a task, e.g. "matmul with bias and relu epilog".

    Args:
        task: Short description of what the code should do.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered structurally. The description adds genuine value by disclosing output qualities: the code is runnable, GPU-verified, and includes pitfalls, which is information the annotations do not carry. It doesn't state anything about result size, freshness, or whether the example is unique per call.

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-loaded with the core capability followed by a concrete example and a compact Args block. The Args restatement of the single parameter is slightly redundant given the schema, but it is short and harmless rather than verbose.

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 single-parameter retrieval tool with no output schema and readOnly annotations, the description covers what is returned (verified example code with pitfalls) and what input is expected, which is sufficient to invoke correctly. Missing only sibling routing guidance, which is a usage-guideline concern rather than a completeness gap in the return contract.

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 description coverage is 0%, so the description carries the burden: it defines task as 'Short description of what the code should do' and supplies a worked example, which is more than the schema's bare string type. The definition is adequate for a single required parameter, though it doesn't state how detailed or keyword-oriented the task string should be.

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 verb (Get) and a concrete resource (runnable, GPU-verified example code) plus the scope (curated APIs most relevant to a task), with a concrete example. It does not explicitly differentiate itself from the closest sibling check_snippet, which also sounds like code retrieval, so it stops short of a 5.

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 implied by the example ('matmul with bias and relu epilog') and the phrase 'for a task', which tells the agent the input shape expected. However, there is no explicit when-to-use vs. when-not guidance and no mention of the alternatives search_api, get_api_card, or check_snippet, leaving the routing decision to inference.

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

Deploy Server

Other Tools