Skip to main content
Glama

diagram_generate

Sketch a teamshared.diagram/v1 from GitHub manifests and store it.

Reads the repo tree plus README, compose, package manifests, infra/, and SQL migrations. Produces mode=generated Mermaid (C4-container or ER sketch — not architecture recovery). Source metadata (github, ref, commit, paths, content_hash) lives on the document; TeamShared is not a git host. Pass work_id / project_id to attach. Refresh later with diagram_sync.

This generator emits teamshared.diagram/v1 only. For the layered 3D scene (teamshared.diagram/v2), author the scene yourself with file_create(content_format='diagram').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoGit ref (branch, tag, or commit)main
kindNo'software' (C4-container sketch), 'data' (ER), or 'infra'software
viewNoDiagram view label stored on teamshared.diagram/v1 (defaults: C4-container / ER / containers)
agentNoOverride agent identity
titleNoShared-file title; defaults to '{github} {kind} {view}'
githubNoowner/repo to read via the GitHub API. Optional when work_id= already has github= set — that work field is the coding repo pointer, not a second git host.
work_idNoAttach the new shared file to this work item (kind=artifact)
project_idNoAttach the new shared file to this project (kind=artifact)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the output format (Mermaid), the mode ('generated'), the limitation (not architecture recovery), the fact that TeamShared is not a git host, and the version restriction. It does not explicitly mention side effects like permissions or failure behavior, but the read-and-store nature is conveyed. This is strong but not exhaustive.

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 moderately long but well-structured, with the core purpose front-loaded and supplementary details (source reading, metadata, alternatives) following logically. Each sentence adds information; no filler. It is slightly verbose but remains efficient for a tool with 8 parameters.

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?

Given the tool's complexity (8 optional params, output schema present), the description covers the main workflow, version constraints, and usage context. It explains the source inputs and the attach mechanism. It does not detail the exact output structure, but that is delegated to the output schema. Overall, it provides enough for an agent to decide when and how to invoke it correctly.

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 coverage is 100%, so the baseline is 3. The description adds value beyond the schema by clarifying the github parameter's optionality when work_id already carries a github pointer, and by noting default behaviors for view and title. These clarifications help avoid misuse, making it a 4.

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 a specific verb ('Sketch') and resource ('a teamshared.diagram/v1 from GitHub manifests'), and immediately distinguishes it from the sibling diagram_sync (refresh) and file_create (v2 authoring). It clearly states what it does and what it is not (architecture recovery), leaving no ambiguity about its role.

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?

It explicitly states when to use this tool (to generate a v1 diagram from GitHub manifests) and when not to (for the layered v2 scene, use file_create with content_format='diagram'). It also references diagram_sync for later refresh, providing clear routing among alternatives.

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.