Skip to main content
Glama

get_diagram_examples

Get ready-to-use example code for cloud, process, and infrastructure diagrams to learn syntax and structure before building custom diagrams.

Instructions

Get example code for different types of diagrams.

This tool provides ready-to-use example code for various diagram types. Use these examples to understand the syntax and capabilities of the diagrams package before creating your own custom diagrams.

USAGE INSTRUCTIONS:

  1. Select the diagram type you're interested in (or 'all' to see all examples)

  2. Study the returned examples to understand the structure and syntax

  3. Use these examples as templates for your own diagrams

  4. When ready, modify an example or write your own code and use generate_diagram

EXAMPLE CATEGORIES:

  • gcp: GCP cloud architecture diagrams (basic services, grouped workers, clustered web services, AI Platform)

  • sequence: Process and interaction flow diagrams

  • flow: Decision trees and workflow diagrams

  • class: Object relationship and inheritance diagrams

  • k8s: Kubernetes architecture diagrams

  • onprem: On-premises infrastructure diagrams

  • custom: Custom diagrams with custom icons

  • all: All available examples across categories

Each example demonstrates different features of the diagrams package:

  • Basic connections between components

  • Grouping with Clusters

  • Advanced styling with Edge attributes

  • Different layout directions

  • Multiple component instances

  • Custom icons and nodes

      Parameters:
    

    diagram_type (str): Type of diagram example to return. Options: gcp, sequence, flow, class, k8s, onprem, custom, all

Returns: Dictionary with example code for the requested diagram type(s), organized by example name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diagram_typeNoType of diagram example to return. Options: gcp, sequence, flow, class, k8s, onprem, custom, allall
Behavior4/5

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

Without annotations, description bears full burden. It explains read-only nature by stating 'get example code' and details return type, though no explicit safety note.

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?

Structured with sections, front-loaded purpose, but slightly verbose with redundant explanatory sentences.

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

Completeness5/5

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

For a single-parameter tool with no output schema, the description thoroughly covers purpose, categories, usage, and examples, leaving minimal ambiguity.

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 coverage is 100% but description adds extensive context: lists categories with examples and explains what each demonstrates, far beyond the enum list.

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 clearly states the tool gets example code for diagram types, lists categories, and distinguishes from sibling tools like generate_diagram.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit step-by-step instructions are provided, along with when to use (learn syntax before creating) and an alternative tool link.

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

Install Server

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/lesonky/gcp-diagrams-mcp-server'

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