Skip to main content
Glama
petri-net-sim

pns-server MCP Server

add_generator

Model token arrivals by specifying interval or rate, batch size, and distribution type for simulation in Petri net arrival processes.

Instructions

Add a Generator (Source) pattern that creates tokens at regular intervals.

Use this for arrival processes. Specify EITHER interval OR rate (not both):

Using RATE (preferred for "N items per time unit"):

  • "4 parts per minute" -> rate=4, time_unit="min"

  • "10 customers per hour" -> rate=10, time_unit="h"

Using INTERVAL (for "every N time units"):

  • "every 3 minutes" -> interval=3, time_unit="min"

  • "every 30 seconds" -> interval=30, time_unit="s"

BATCH GENERATION (multiple items per arrival):

  • "5 items arrive every 5 minutes" -> interval=5, time_unit="min", batch_size=5

DISTRIBUTION SELECTION:

  • "exp": For random/Poisson arrivals

  • "norm": For arrivals with deviation ("every 3±1 min" -> norm, std=1, time_unit="min")

  • "unif": For uniformly distributed arrivals

  • "det": For fixed/constant intervals

UNITS — TWO INDEPENDENT KNOBS:

  • time_unit applies to interval / rate.

  • deviation_unit applies to standard_deviation. If omitted, it inherits from time_unit. Use it when the mean and the ± are in DIFFERENT units.

Canonical translations:

  • "1 per minute ±10 sec" -> interval=1, time_unit="min", standard_deviation=10, deviation_unit="s"

  • "every 5 min ±30 sec" -> interval=5, time_unit="min", standard_deviation=30, deviation_unit="s"

  • "every 5 min ±1 min" (same units) -> interval=5, time_unit="min", standard_deviation=1 (deviation_unit omitted)

Args: name: Name for this generator (e.g., "CustomerArrivals", "PartsInput") interval: Mean time BETWEEN arrivals in time_unit (use this OR rate, not both) rate: Number of arrivals PER time_unit (use this OR interval, not both) distribution: "exp", "norm", "unif", or "det" standard_deviation: Spread for "norm"/"unif" distributions (in deviation_unit, or time_unit if deviation_unit omitted) batch_size: Number of tokens per arrival (default: 1) time_unit: Unit for interval/rate — "s", "min", "h", "d". PASS THIS EXPLICITLY when the user describes the mean in non-second terms; the response echoes the resulting duration/rate in all four units so you can sanity-check. deviation_unit: Unit for standard_deviation. Pass ONLY when it differs from time_unit (e.g. mean in minutes, ± in seconds).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
intervalNo
rateNo
distributionNoexp
standard_deviationNo
batch_sizeNo
time_unitNos
deviation_unitNo

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 the full burden. It explains the tool's behavior in terms of token creation and interval semantics, but does not disclose potential side effects, destructive actions, or required permissions.

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?

The description is well-structured with sections, examples, and canonical translations. While somewhat verbose, the examples enhance clarity and the structure aids readability.

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 8 parameters, 1 required, no annotations, and with an output schema present, the description comprehensively covers all parameters and usage contexts. It provides enough information for an AI agent to correctly invoke the tool.

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?

The schema has 0% coverage, yet the description thoroughly explains each parameter, including examples for interval, rate, distribution, standard_deviation, batch_size, time_unit, and deviation_unit. This adds significant meaning 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 it adds a Generator pattern that creates tokens at regular intervals. It explains the tool's purpose with specific verb and resource, and the sibling tools list includes add_nonstationary_generator, indicating differentiation.

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?

The description explicitly states 'Use this for arrival processes' and provides detailed guidance on when to use interval vs rate, distribution selection, and batch_size. However, it does not directly mention alternative tools for non-stationary arrivals.

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