Skip to main content
Glama

search_examples

Search for runnable CUDA-Q example programs by query, language, and version. Use these complete examples from the CUDA-Q repository to avoid writing kernels from memory.

Instructions

Find complete, runnable CUDA-Q example programs.

Sources are the example, snippet, and application files shipped in the CUDA-Q repository at the matching release. Prefer adapting these over writing kernels from memory.

Args: query: What the example should show, for example "GHZ state", "VQE", or "noise model". language: "python" or "cpp" to filter; omit for both. version: Docs version. Defaults to the installed cudaq version. limit: Maximum number of examples (default 3).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
versionNo
languageNo
Install Server

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations provided, the description carries the full disclosure burden. It adds some behavioral context by explaining the source of examples ('shipped in the CUDA-Q repository at the matching release') and that results are 'complete, runnable.' However, it does not describe return format, pagination, or failure modes, leaving gaps typical of a search tool.

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?

The description is structured with a clear opening sentence, a brief source/usage note, and a parameter list. It is not as lean as a two-sentence ideal, but every section earns its place given the absent schema descriptions.

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?

The tool has no output schema or annotations, but the description covers purpose, source, usage preference, and all parameters. It lacks an explicit description of the return value, but the phrase 'Find complete, runnable CUDA-Q example programs' suggests the actual code is returned, making it reasonably complete for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description's Args section is essential. It explains each parameter meaningfully: query with examples ('GHZ state', 'VQE'), language filter, version default, and limit default. This fully compensates for the schema's lack of descriptions.

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 opens with 'Find complete, runnable CUDA-Q example programs,' which clearly states the verb (find) and resource (example programs). It distinguishes this tool from siblings like search_docs, find_api, and get_page by focusing specifically on examples with a stated preference for adapting them.

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?

The description provides explicit usage guidance: 'Prefer adapting these over writing kernels from memory.' It also clarifies the source and version matching. However, it does not explicitly state when not to use this tool or name alternatives, falling just short of a 5.

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

Other Tools

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/rogerawong/cudaq-docs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server