Skip to main content
Glama
petri-net-sim

pns-server MCP Server

add_fork_join

Split one entity into N parallel branches and synchronize after all complete. Models parallel workflows that require all branches to finish.

Instructions

Add a ForkJoin (AND-split / AND-join) pattern for parallel branch execution.

A single entity enters, splits into N independent parallel branches, and continues ONLY when ALL N branches have completed. Essential for modeling parallel workflows that must synchronize before proceeding.

Difference from other patterns:

  • Assembly: waits for N entities from different arrival streams

  • Duplicate: copies diverge and NEVER rejoin

  • ForkJoin: one entity → N parallel branches → all must complete before output

Args: name: Instance name (e.g., "PatientExam", "QualityGate") n_branches: Number of parallel branches (default: 2) branch_times: Mean processing time per branch in time_unit. Length must equal n_branches. Default: [30.0] * n_branches branch_distribution: Distribution for branches — "exp", "norm", "unif", "det" time_unit: Time unit for branch_times — "s", "min", "h"

Returns branch IDs in the response for manual wiring when branches are processed by external patterns (retrial queues, machines, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
n_branchesNo
branch_timesNo
branch_distributionNoexp
time_unitNos

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, but description explains the split-join behavior, synchronization requirement, and return value (branch IDs). Could mention error conditions or prerequisites, but sufficient for a pattern addition 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-structured with purpose, differentiation, and Args. Front-loaded with key behavior. Slightly long but every sentence adds value; minor room for trimming.

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 5 input parameters, documented behavior, and output description (branch IDs for wiring), the description covers essential aspects. Lacks mention of interactions with running networks, but adequate for the tool's 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?

Schema description coverage is 0%, but the Add section thoroughly documents each parameter: meaning, default, constraints (e.g., branch_times length equals n_branches), and valid values for distributions and time units. Fully compensates for schema gaps.

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?

Clearly states it adds a ForkJoin pattern for parallel branch execution, with specific verb and resource. Differentiates from assembly and duplicate siblings, establishing its unique 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?

Provides explicit usage context: 'Essential for modeling parallel workflows that must synchronize before proceeding.' Also contrasts with assembly and duplicate to guide when not to use those.

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