Skip to main content
Glama

register_slash_command

Idempotent

Register a workspace slash command to run an HTTP handler or MCP tool when users post /name text, returning the command and signing secret for webhook verification.

Instructions

Register a workspace slash command: a message posted as /name text then runs the handler. With handler_kind http, Maidan POSTs a JSON payload (command, name, text, workspace_id, channel_id, thread_id, author_id, message_id) signed in the X-Maidan-Signature header to handler_target, and this call returns {command, secret} with the signing secret. With mcp_tool it runs the named MCP tool and returns the command. The name must not be in use by an active command; list them with list_slash_commands and free a name with revoke_slash_command. Requires workspace:write; mcp_tool also needs the capability the target tool requires, plus channel:admin when that tool is not read-only.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspace_id": "<workspace_id>",
      "name": "<name>",
      "handler_kind": "<handler_kind>",
      "handler_target": "<handler_target>"
    },
    "name": "register_slash_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesCommand name. A leading slash is stripped and the name is lowercased; 1 to 32 characters from a-z, 0-9, underscore and hyphen.
descriptionNoOptional text describing what the command does, stored with the command and returned by list_slash_commands.
handler_kindYeshttp to deliver the command to a URL, or mcp_tool to run an MCP tool by name.
workspace_idYesUUID of your own workspace (whoami returns it). A different workspace is refused.
handler_targetYesFor http, the URL that receives the POST; it must pass the server's outbound-request check. For mcp_tool, the exact name of an MCP tool, for example whoami; an unknown name is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv479.0.2
    • addedInput schema / properties / description / description
      Added value: +"Optional text describing what the command does, stored with the command and returned by list_slash_commands."
    • addedInput schema / properties / handler_kind / description
      Added value: +"http to deliver the command to a URL, or mcp_tool to run an MCP tool by name."
    • addedInput schema / properties / handler_target / description
      Added value: +"For http, the URL that receives the POST; it must pass the server's outbound-request check. For mcp_tool, the exact name of an MCP tool, for example whoami; an unknown name is refused."
    • addedInput schema / properties / name / description
      Added value: +"Command name. A leading slash is stripped and the name is lowercased; 1 to 32 characters from a-z, 0-9, underscore and hyphen."
    • addedInput schema / properties / workspace_id / description
      Added value: +"UUID of your own workspace (whoami returns it). A different workspace is refused."
  2. First observedv479.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations, it discloses the outbound POST payload fields, the X-Maidan-Signature header, the differing return shapes per handler_kind ({command, secret} vs command), the name-uniqueness constraint, and the permission requirements. The only ambiguity is a mild tension with idempotentHint=true, since a repeated registration is refused rather than being a no-op, and that behavior is not spelled out.

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?

Three dense sentences, front-loaded with the core action and semantics before permissions. Little is wasted, though the payload field list and permission clause make it heavier than ideal for a single-paragraph description.

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?

There is no output schema, and the description compensates by describing the return value for both handler kinds, including the signing secret. Combined with the permission and uniqueness notes, an agent has everything needed to call it correctly.

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 the baseline is 3, but the description adds real meaning: it explains the effect of each handler_kind value, what handler_target must satisfy in each mode, and that name collisions are rejected. It goes beyond restating the schema fields.

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 first sentence gives a concrete verb and resource ('Register a workspace slash command') and immediately explains the runtime semantics ('a message posted as /name text then runs the handler'). It also differentiates the two handler modes, so an agent can tell exactly what this does versus revoke_slash_command or list_slash_commands.

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?

It names the sibling alternatives and the conditions that select them: list names with list_slash_commands, free a name with revoke_slash_command. It also states prerequisites for each mode (workspace:write, the target tool's capability, channel:admin for non-read-only mcp_tool targets), leaving little to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools