Skip to main content
Glama
zagushka

Foundry REST API MCP

by zagushka

foundry_send_chat_as_user

Send a chat message in Foundry as a user, with author verification. Enforces that the API key is scoped to that user or has GM access to prevent impersonation.

Instructions

Create a chat message as a Foundry user and verify the returned ChatMessage.author.id. The relay permits this only for the API key's scoped user, or for a GM key; scoped keys cannot be overridden.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasNo
userIdYesFoundry user ID for the message author. The relay must reject it unless it matches the scoped API-key user or the key has GM access.
contentYes
speakerNo
whisperNoRecipient Foundry user IDs. For a private reply, pass only the originating player.
chatTypeNoUse 3 for a Whisper.
clientIdNoFoundry client ID; omit when the API key is scoped to one world.
Behavior4/5

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

Beyond the readOnlyHint=false annotation, the description discloses the permission restrictions and the non-obvious verification behavior. It reveals that the relay enforces a strict identity check and that scoped keys are not allowed to impersonate others. This adds meaningful context not present in the annotations.

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 two sentences, action-first, and contains no filler. It delivers the core purpose and critical constraints in a tight, scannable format.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core action and permission model, but without an output schema or detailed parameter semantics, an agent may struggle with constructing valid requests (e.g., whisper chatType usage). It is adequate but leaves gaps around parameter behavior and error handling.

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

Parameters2/5

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

The description provides no additional parameter guidance. While the schema includes descriptions for userId, whisper, chatType, and clientId, it leaves alias, content, and speaker undocumented. The description does not compensate for these gaps, leaving ambiguity for parameters like speaker and alias.

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 uses a specific verb+resource construction: 'Create a chat message as a Foundry user'. It also adds a verification step ('verify the returned ChatMessage.author.id'), which clarifies the intended outcome. This distinguishes it from the sibling tool foundry_send_chat_message by emphasizing user impersonation and scoping.

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?

It clearly states when the tool can be used: 'The relay permits this only for the API key's scoped user, or for a GM key'. It also warns that 'scoped keys cannot be overridden', which is a key usage constraint. It does not explicitly name alternative tools, but the context implies when this tool is appropriate.

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/zagushka/foundry-rest-api-mcp'

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