Skip to main content
Glama

Get a code example

get_example
Read-onlyIdempotent

Retrieve a complete, source-backed Angular component example—including template and imports—for a specified component, with optional section or variant filters.

Instructions

Return one complete, source-backed code example of a component (a standalone Angular component with its template and imports).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "component": "<component>"
    },
    "name": "get_example"
  }
}

Input Schema

NameRequiredDescriptionDefault
sectionNoSection id or label ("basic", "lazy", "Template"...). Defaults to the first section with code.
variantNoFeature hint used when no section matches ("outlined", "severity", "icons"...).
componentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds useful behavior beyond them — that exactly one example is returned (not a list) and that it is source-backed with template and imports included. It omits the important resolution behavior when the section/variant do not match and says nothing about failure when no code exists.

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?

A single well-formed sentence with the core action front-loaded and the output shape in a tight parenthetical. Nothing is redundant, though the parenthetical is doing a lot of work that could be split for readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With three parameters, no output schema, and a single-sentence description, the definition covers what the tool returns but not how inputs resolve or what happens on a miss. Given there is no output schema, the description should carry more of the return and fallback contract.

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 67%, with section and variant documented in the schema but the required component parameter carrying no schema description; the description only weakly implies it identifies which component the example is for. The description also does not explain the section-then-variant fallback precedence, which is the main semantic an agent needs.

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 states a concrete verb-plus-resource ("Return one complete, source-backed code example of a component") and clarifies the expected output shape (standalone Angular component with template and imports). It is clearly differentiated from a plain component lookup by emphasizing a single runnable example, though it does not explicitly contrast itself with sibling get_component.

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 or when-not-to-use guidance: nothing tells the agent whether to prefer this over get_component or get_guide, or under what conditions a code example is the right artifact. Usage is only inferable from the phrase "one complete ... code example".

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