Skip to main content
Glama
ShellFrameAI

AgentSecure Community

Official

agentsecure.check_messages

Check an agent's local inbox counts to determine if it has unread messages or pending approvals before responding; returns counts only and does not mark messages as read.

Instructions

Check local inbox counts before answering whether this agent has messages or approvals. Returns agent_id, unread_count, pending_approval_count, and a notice, not message content. Pending approvals are those assigned to the agent or its registered team, not all requests created by it. Does not mark messages read. Use agentsecure.list_messages for records and agentsecure.read_message to acknowledge one. Example: {"agent_id": "backend-agent"}.

Input Schema

NameRequiredDescriptionDefault
agent_idYesNon-empty Mesh agent ID, e.g. backend-agent. Pass this session's AGENTSECURE_AGENT_ID value when set; it is not read automatically. IDs are caller-supplied local labels, not authentication credentials.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / agent_id / description
      Added value: +"Non-empty Mesh agent ID, e.g. backend-agent. Pass this session's AGENTSECURE_AGENT_ID value when set; it is not read automatically. IDs are caller-supplied local labels, not authentication credentials."
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it names the exact return fields, declares the operation is non-mutating ('Does not mark messages read'), and clarifies a subtle scoping rule that pending approvals include those assigned to the agent or its registered team, not merely requests it created. It stops short of failure modes or cost/latency characteristics, which keeps it from a 5.

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?

Four short sentences, front-loaded with the purpose, followed by return shape, scoping caveat, side-effect disclaimer, alternatives, and an example. Every sentence contributes a distinct fact with no restatement of the tool name.

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, so the description must describe return values — and it enumerates them precisely. For a single-parameter read tool, an agent has everything needed to decide and invoke 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 a concrete invocation example ({"agent_id": "backend-agent"}) and reinforces that this is a caller-supplied local label rather than a credential. That extra framing helps an agent pick the value to pass.

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?

Specific verb (check) plus resource (local inbox counts) with an explicit statement of what is and isn't returned: agent_id, unread_count, pending_approval_count, and a notice, 'not message content'. It also carves itself apart from agentsecure.list_messages and agentsecure.read_message by name, so no schema opening is needed to disambiguate.

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?

States the triggering condition ('before answering whether this agent has messages or approvals') and routes to the two alternatives with their distinct purposes: list_messages for records, read_message to acknowledge one. Nothing about tool selection is left to inference.

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