Skip to main content
Glama
PasinduGunarathne

ballerina-activemq-mcp-server

Add topic module

mq_add_topic

Add a JMS topic helper module to a Ballerina project, creating a publish function and optional durable subscriber for pub/sub messaging.

Instructions

Add a topic (pub/sub) helper module to an existing project: creates modules//.bal with a publish() function that sends to "topic://". Subscribers are created as Listener services (use mq_add_listener with type=topic, optionally durable=true + subscriber_name). Does not overwrite unless overwrite=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
durableNoGenerate a DURABLE subscriber (survives disconnects). Requires subscriber_name.
org_nameYesBallerina package organisation name (e.g. "acme"). Used in Ballerina.toml and the Config.toml table header [org.project].
overwriteNoOverwrite the module file if it already exists.
topic_nameYesJMS topic name (pub/sub). Example: order.events
project_nameYesBallerina package / project name. Becomes the folder <bi_path>/<project_name> and the package name.
project_pathYesAbsolute or ~/%USERPROFILE%-relative path to an existing scaffolded project root (the folder containing Ballerina.toml).
subscriber_nameNoDurable subscription name (required when durable=true).
Behavior4/5

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

Beyond annotations (readOnly=false, destructive=false), the description discloses key behaviors: it creates a specific file path, generates a publish function, and has an overwrite guard ('Does not overwrite unless overwrite=true'). It also notes that subscribers should be created via mq_add_listener, providing clarity about side effects and system architecture.

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 three sentences, front-loaded with the core purpose, and every sentence adds value: file creation, function behavior, subscriber alternative, and overwrite behavior. No fluff or repetition.

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 no output schema and moderate complexity (7 params, code generation), the description covers essential context: what is created, how subscribers are handled, and overwrite behavior. It doesn't mention return values or error handling, but for selection and invocation, it provides sufficient context. It also points to the sibling tool for listener creation, improving completeness.

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 coverage is 100%, so baseline is 3. The description adds meaning beyond the schema by explaining how topic_name maps to the file and function (publish<Name>() to 'topic://<topic>') and how durable/subscriber_name relate to listener creation. This enhances parameter understanding without redundancy.

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 'Add a topic (pub/sub) helper module to an existing project' and specifies exactly what is created (modules/<topic>/<topic>.bal with a publish<Name>() function). It distinguishes from siblings by explicitly mentioning mq_add_listener for subscribers and implying queue vs topic via 'pub/sub'.

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 gives clear context: use this to add a topic publisher module to an existing project. It names the alternative tool for creating subscribers ('use mq_add_listener with type=topic'), but does not explicitly exclude other cases like queues or when not to use it. Still, the guidance is actionable.

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/PasinduGunarathne/wso2-bi-activemq-mcp-server'

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