Skip to content
Connect an agent
Patterns

Find pattern

Find a ready-made architecture diagram.

POST/v1/patterns/find

TL;DR

QuestionAnswer
What does it do?Find a ready-made architecture diagram.
Which tool does the same?find_pattern
What does it take?A JSON body of type FindPatternInput.
What does it return?Status 200 with a body of type FindPatternResponse.
What can go wrong?400 the body failed schema validation; 401 the api key is missing or not valid; 403 the account is on the free plan, which does not include the rest drawing and checking routes (plan.rest_not_included); 413 the body is larger than the size cap; 429 too many requests. Every failure uses the one error envelope.

What it does

Takes a request in plain words, such as serverless api or two availability zones, and optionally a provider flavour, tags, a diagram kind, and a limit of up to 5. Answers with the best matches first, each with an id, a one-sentence summary, its tags, and the flavours it comes in, and never the source, so a search stays small. Nothing that fits is a normal 200 result with no matches and a hint for what to try next, never an error. Start here when a request names a common architecture, then read the pattern with the get route or draw it with the draw route.

Request body

The body has the type FindPatternInput.

FieldTypeRequiredDescription
querystringyesThe architecture wanted, in plain words, such as "three tier network". at least 1 character; at most 200 characters.
provider"neutral" | "aws" | "azure" | "gcp"noOnly patterns that come in this flavour: neutral, aws, azure, or gcp.
tagsstring[]noTags every result must have, such as "load balancer". Up to 5.
kind"flow" | "sequence" | "schema" | "git" | "gantt" | "class" | "state" | "timeline" | "journey" | "mindmap" | "treemap" | "pie" | "quadrant" | "layers" | "c4" | "matrix" | "sankey" | "xychart" | "tree" | "swimlane"noOnly patterns of this diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, or swimlane.
limitintegernoMost results to return, up to 5. minimum 1; maximum 5; default 5.

Responses

StatusMeaningBody
200The matching patterns, best first, and what to call next.FindPatternResponse
400The body failed schema validation.ErrorResponse
401The API key is missing or not valid.ErrorResponse
403The account is on the Free plan, which does not include the REST drawing and checking routes (plan.rest_not_included).ErrorResponse
413The body is larger than the size cap.ErrorResponse
429Too many requests.ErrorResponse

Response body

A 200 answer has the type FindPatternResponse.

FieldTypeRequiredDescription
querystringyesThe query that was searched.
matchesobject[]yesUp to the limit, best match first. Empty when nothing fits.
matches[].idstringyesThe pattern id, as find_pattern returns it, such as three-tier-network. at least 1 character; at most 60 characters.
matches[].titlestringyes
matches[].summarystringyesOne sentence: what the diagram shows.
matches[].kindstringyesA diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, or swimlane today. Later versions add kinds, so expect others.
matches[].tagsstring[]yes
matches[].providers("neutral" | "aws" | "azure" | "gcp")[]yesThe flavours the pattern comes in.
matches[].scorenumberyesHow well it matches; only the order of the results is meaningful.
nextstringyesThe next step in one sentence.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
find_patternThe same operation as an MCP tool
Tool referenceThe operations as callable tools