Skip to main content
Glama
petri-net-sim

pns-server MCP Server

find_free_position

Determine free coordinates on the canvas near an existing Petri net element to place a new node without overlapping. Call this before adding a place or transition to get usable x,y positions.

Instructions

Find canvas coordinates for a new element near an existing one, avoiding overlaps.

Call this BEFORE add_place or add_transition to get good x,y coordinates. Then pass those coordinates directly to add_place/add_transition.

Recommended workflow when adding a place connected to an existing element:

  1. find_free_position(near_element_id=, direction=)

  2. add_place(name=..., tokens=..., x=, y=)

  3. add_arc(source_id=..., target_id=...)

Args: near_element_id: ID of the place or transition to position near (use list_elements to find IDs and current coordinates) direction: Where to place the new element relative to the anchor: "above" (same x, lower y) | "below" | "left" | "right"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
near_element_idYes
directionNoabove

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries full burden. It mentions overlap avoidance but does not specify what happens if no free position is found near the given element (e.g., congested area). This lack of failure case disclosure limits transparency.

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-structured with a clear purpose, usage guidelines, and parameter explanations. It is front-loaded with the main purpose and every sentence adds value. No unnecessary text.

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?

The description is sufficient for guiding usage, including parameters and workflow. However, it does not explicitly state that the tool returns x and y coordinates (though implied by 'pass those coordinates directly'). The return format is assumed from context. Slight gap for new users.

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 description coverage is 0%, but the description adds meaningful context: near_element_id is explained as an ID from list_elements, and direction lists the options ('above', 'below', 'left', 'right') with relative positioning. This goes beyond the 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?

The description clearly states the tool finds canvas coordinates for a new element near an existing one, avoiding overlaps. It uses a specific verb 'find' and resource 'canvas coordinates', effectively distinguishing it from sibling tools like add_place and add_transition.

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?

The description explicitly says 'Call this BEFORE add_place or add_transition' and provides a recommended workflow with numbered steps. It gives clear context on when to use the tool and how to pass the returned coordinates to subsequent tools.

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