Skip to main content
Glama

draw_sequence_diagram

Draws a UML sequence diagram from participants, messages, and frames without coordinates, saves it as PNG with an input file, and returns validation results and the image.

Instructions

교류도를 그려 PNG와 입력 파일로 저장하고, 검사 결과와 그림을 함께 돌려준다. 교류도는 도구가 배치한다 — 좌표는 받지 않고, 생명선 간격과 메시지 높이를 글자 폭에 맞춰 정하고 활성 막대를 메시지에서 잇는다.

입력 필드는 인자마다 붙은 설명에 있다.

결과

  • 글: 검사 결과, 저장한 그림·입력 파일 경로와 그림 픽셀 크기. 검사 항목은 메시지·프레임·노트를 입력 안의 자리(messages[3]·frames[0]·notes[0])로, 참여자를 이름으로 가리킨다.

  • 그림: 저장한 PNG. 긴 변이 1568px를 넘으면 그 길이로 줄여 돌려준다(저장한 그림은 줄이지 않는다).

  • 입력 파일: 그림 옆 <file_name>.cysuml.json에 그린 도구 이름(tool)과 이 입력(out_dir만 빼고)을 저장한다. 있던 그림을 고칠 때는 이 파일을 읽어 고친 뒤 out_dir에 그 폴더를 주어 tool의 도구로 다시 그린다 — 그대로 넣으면 같은 그림이 나온다(tool은 도구가 무시한다).

  • 입력이 틀리면 그리지 않고 틀린 곳을 messages[2].to 꼴 자리와 함께 모두 모아 오류로 돌려준다. 그림이 너무 커서 PNG로 그릴 수 없거나, 저장할 폴더에 쓸 수 없거나, 도구가 배치하지 못했을 때도 오류로 돌려준다.

교류도 그리는 흐름:

  1. 참여자 차례, 메시지 차례, 프레임이 덮는 메시지 범위를 정해 그린다. 좌표는 주지 않는다 — 생명선 간격, 메시지 높이, 활성 막대는 도구가 정한다.

  2. 돌려받은 검사 결과와 그림을 본다. 교류도는 도구가 배치하므로 불합격은 cysUML의 배치 버그다. 그래도 그 그림이 필요하면 항목마다 붙은 힌트대로 입력을 바꿔 비켜 간다 — 참여자 순서나 메시지 차례, 프레임이 덮는 범위(first·last·칸·before)를 바꾸거나, 글자를 줄이거나, 그림을 나눈다. 배치하지 못했다는 오류가 와도 같다.

  3. 고친 입력을 같은 file_name으로 다시 그린다(파일을 덮어쓴다). 그림 크기는 알림이라 불합격이 아니다. 다만 개수 한도 안이어도 그림이 너무 크면 PNG로 그리지 못해 오류가 되니, 메시지가 많아 그림이 길면 나눈다.

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": {
      "file_name": "<file_name>",
      "participants": "<participants>"
    },
    "name": "draw_sequence_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNo- notes: 노트 글자 목록(50개까지). 그림 아래에 차례대로 모은다.
scaleNo출력 배율(기본 1.6, 0.25 이상). 보통은 주지 않는다.
framesNo- frames: 프레임 목록(없어도 된다, 100개까지). 메시지는 messages 안의 자리(0부터)로 가리킨다. 프레임은 그림 전체 폭으로 그리고, 프레임끼리 덮는 메시지가 겹치면 안 된다(프레임 안에 프레임·ref를 넣지 않는다). - kind(필수): "loop"·"opt"·"alt"·"ref". - loop·opt: first·last(필수, 덮는 첫 메시지와 끝 메시지), condition(조건). - alt: branches(필수, 칸 둘 이상). 칸마다 condition·first·last를 모두 주고, 칸은 빈틈없이 이어 붙인다(다음 칸 first는 앞 칸 last+1). 마지막 칸 조건은 흔히 "else"다. - ref: name(필수, 상자에 쓸 이름), before(필수, 이 자리 메시지 바로 앞에 놓는다 — 메시지 수와 같으면 맨 뒤). - condition은 대괄호 없이 쓴다(도구가 씌운다).
out_dirNo저장할 폴더. 주지 않으면 서버 작업 폴더 아래 diagrams/이고, 상대 경로도 서버 작업 폴더 기준이다.
messagesNo- messages: 메시지 목록(없어도 된다, 300개까지). 이 차례로 위에서부터 놓는다. - from·to(필수): 참여자 이름. 자기 자신에게 보내는 메시지는 받지 않는다 — 그 일은 notes에 적는다. - kind: "call"(기본, 호출)·"reply"(반환, 점선)·"create"(생명선을 만든다 — 그 생명선의 머리가 이 메시지 높이에 놓인다). - name: 메시지 글자. call은 꼭 준다(부르는 연산). reply는 돌려주는 값이 있을 때, create는 «create» 밑에 한 줄 더 쓸 때만 준다. - 반환(reply)은 나를 부른 쪽으로 보낸다 — A가 B를 불렀으면 B에서 A로. 거꾸로 보내도 그려지지만 뜻이 틀린다. - create는 액터에 보내지 못하고, 그 생명선이 주고받는 첫 메시지여야 한다. 같은 생명선을 다시 만드는 것은 같은 alt의 다른 칸에서만 한다 — 칸마다 그 높이에 머리를 그리고, 앞 칸에서 만든 생명선은 그 칸과 함께 끝나 다시 만들기 전에는 쓰지 못한다. - 활성 막대는 도구가 잇는다. 대개 생명선을 부르면 열리고, 그 생명선이 반환하거나 부른 쪽이 다음 메시지를 보내면 닫힌다(액터가 받는 호출과 프레임 둘레는 규칙이 따로 있다).
file_nameYes저장할 파일 이름(확장자 없이). 그림(.png)과 입력 파일(.cysuml.json)에 쓰고, 같은 이름이면 둘 다 덮어쓴다.
participantsYes- participants: 참여자 목록(하나 이상, 40개까지). 이 차례로 왼쪽부터 놓는다. - name(필수): 메시지가 이 이름으로 참여자를 가리키므로 서로 달라야 한다. - kind: "lifeline"(기본)·"actor".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations, the description carries the full load and does it well: overwrite semantics for both .png and .cysuml.json, a 1568px preview downscale that is NOT applied to the saved image, aggregation of all input errors with paths like messages[2].to, error cases for oversize images and unwritable folders, and the fact that the 'tool' field is ignored on re-input. That is exactly the behavioral context an agent needs before invoking a side-effecting draw 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?

Well front-loaded with a one-sentence purpose, then clearly labeled 결과 and 흐름 sections and numbered steps. Minor redundancy: the auto-layout/no-coordinates point is stated in the intro and again in step 1, and 'split the diagram' advice appears twice.

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?

No output schema exists, yet the description fully documents the return payload (text findings, image, file paths, pixel size), the sidecar file format, error behavior, and the edit-and-redraw cycle. For a seven-parameter tool with frames, messages, and participants, nothing an agent needs to call it correctly is missing.

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 description coverage is 100%, so the schema already documents every field, and the description explicitly delegates ('입력 필드는 인자마다 붙은 설명에 있다'). It adds only marginal cross-field meaning, such as out_dir being excluded from the saved input file. Baseline 3 is appropriate.

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?

States a specific verb and resource ('교류도를 그려 PNG와 입력 파일로 저장') and adds a distinguishing behavioral trait — the tool lays out the diagram itself and takes no coordinates — which separates it from generic draw tools. It doesn't explicitly differentiate itself from the sibling diagram tools, but the resource name plus the auto-layout constraint makes the purpose unambiguous.

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?

A three-step workflow is spelled out: define participant/message order and frame ranges, inspect the returned validation and image, then redraw with the same file_name to overwrite. It also explains how to work around layout failures (reorder participants, split the diagram). It never states when to prefer a different diagram type, so it stops short of 5.

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