Skip to main content
Glama

Explain actor protocol

explain_actor_protocol
Read-onlyIdempotent

Describe an actor's protocol: message types, constructors, state, init parameters, per-handler effects, and effect summary. Understand how to talk to any actor and what each handler does.

Instructions

Describe one actor's protocol: its message type and constructors, state type, init parameters and effects, per-handler effect rows, and the declared effect summary. Use it to learn how to talk to an actor or what each handler may do; use emit_actor_effect_graph for the actors, supervisors, and tools it reaches transitively, and lookup_definition if you only need its location. Returns actor with name, line, state, message (name, constructors), init (params, effects), handlers (message, effects), and effects; types and rows carry a display string. Read-only: compiles the file's directory in memory (cached until a sibling changes) and writes or executes nothing. Failures are isError results with a stable error.code: file_not_found, read_error, invalid_params, parse_error, or check_error, the last two carrying coded diagnostics in error.data.diagnostics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to a .hird source file, absolute or relative to the server's working directory. Every .hird file in its directory is compiled with it as one program, so imported names resolve; answers may name a sibling file.
actor_nameYesThe actor's name, as declared in this file. Actors are not resolved through imports; an unknown name fails with `not_found` and `error.data.available_actors`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
actorYes
moduleYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changed
    • changedInput schema / properties / actor_name / description
      Previous value: -"The actor's name."New value: +"The actor's name, as declared in this file. Actors are not resolved through imports; an unknown name fails with `not_found` and `error.data.available_actors`."
    • changedInput schema / properties / file / description
      Previous value: -"Path to a .hird source file. Its directory's .hird files are compiled together as one program, so imported names resolve."New value: +"Path to a .hird source file, absolute or relative to the server's working directory. Every .hird file in its directory is compiled with it as one program, so imported names resolve; answers may name a sibling file."
    • changedInput schema / required
      Previous value: -[
      -  "file",
      -  "actor_name"
      -]New value: +[
      +  "actor_name",
      +  "file"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "actor": {
      +      "properties": {
      +        "effects": {
      +          "description": "An effect row: `effects` (each with `head`, `args`, `display`), an optional `tail` row variable, and its `display` string.",
      +          "type": "object"
      +        },
      +        "handlers": {
      +          "type": "array"
      +        },
      +        "init": {
      +          "type": "object"
      +        },
      +        "line": {
      +          "type": "integer"
      +        },
      +        "message": {
      +          "type": "object"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "state": {
      +          "description": "A type, with its `display` string as Hirð prints it.",
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "line",
      +        "state",
      +        "message",
      +        "init",
      +        "handlers",
      +        "effects"
      +      ],
      +      "type": "object"
      +    },
      +    "file": {
      +      "type": "string"
      +    },
      +    "module": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "actor",
      +    "file",
      +    "module"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv0.1.1
    • changedInput schema / properties / file / description
      Previous value: -"Path to a .hird source file."New value: +"Path to a .hird source file. Its directory's .hird files are compiled together as one program, so imported names resolve."
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/destructive hints, so the bar is lower; the description nonetheless adds genuine context: in-memory compilation of the whole directory, caching until a sibling changes, writes/executes nothing, and a stable error.code set with diagnostics in error.data. One defect: the error-code list omits `not_found`, which the input schema cites for unknown actor names, creating a small internal inconsistency. No contradiction with the annotations themselves.

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?

Front-loads purpose, then usage routing, then return shape, then error behavior — a logical order with every sentence earning its place. It is dense rather than padded, though the return-shape enumeration is somewhat long; acceptable given the tool's complexity and the presence of an output schema.

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 an output schema exists (so return values are structurally defined), the description goes beyond by summarizing the returned `actor` shape and error codes. Both required parameters are fully documented, alternatives are routed, and the read-only/caching behavior is disclosed. The only gap is the `not_found` inconsistency, slightly muddying the error-handling story.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% — both file and actor_name are thoroughly documented, including the path-resolution rules and the not_found failure with error.data.available_actors. The description adds no parameter-level meaning beyond this, so the high-coverage baseline of 3 applies.

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?

States a specific verb ('Describe one actor's protocol') tied to a precise resource, and enumerates exactly what the explanation covers: message type, constructors, state type, init params/effects, per-handler effects, and the declared effect summary. It also names sibling tools (emit_actor_effect_graph, lookup_definition) it is not, so an agent can disambiguate without opening any schema.

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?

Gives explicit when-to-use ('learn how to talk to an actor or what each handler may do') and then names the two alternatives with the conditions that select them — emit_actor_effect_graph for transitive reachability, lookup_definition for location-only lookups. No inference required.

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

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/no-materials/hird'

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