Skip to main content
Glama
petri-net-sim

pns-server MCP Server

find_elements

Search places and transitions by name substring to retrieve their IDs and coordinates, enabling placement of new elements near existing ones.

Instructions

Search places and transitions by name substring.

Use this to locate element IDs before calling find_free_position, set_positions, or move_elements_by. Much faster than list_elements when you only need a specific pattern's elements.

Typical workflow for placing a new element near an existing one:

  1. find_elements("Generator") — find anchor element ID and its x,y

  2. find_free_position(near_element_id=, direction="above") — clear coordinates

  3. add_place(name=..., x=, y=)

Args: name_pattern: Case-insensitive substring (e.g. "Generator", "Queue"). Empty string returns all elements of the requested type. element_type: "place", "transition", or omit for both.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
name_patternNo
element_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations exist; the description covers search semantics (case-insensitive substring, empty string returns all) and implies read-only operation. However, it doesn't explicitly state safety or side effects, which would be ideal for a tool without annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized, front-loads the purpose, follows with usage guidance and a detailed workflow example. Every sentence adds value without redundancy.

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?

Given the output schema exists, the description appropriately avoids explaining return values. It covers search behavior, parameter details, and a clear workflow, making it complete for a search tool with moderate complexity.

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?

With 0% schema coverage, the description fully explains both parameters: name_pattern (case-insensitive substring, empty returns all) and element_type (options: place, transition, null for both). This adds critical semantic value beyond the bare schema.

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?

Description explicitly states 'Search places and transitions by name substring.' It specifies the verb (search) and resource (places/transitions), and the scope is clearly distinguished from siblings like list_elements.

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?

Provides explicit when-to-use guidance: 'Use this to locate element IDs before calling find_free_position, set_positions, or move_elements_by.' Also notes it's faster than list_elements for specific patterns and gives a typical workflow.

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/petri-net-sim/pns-server'

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