Skip to main content
Glama

aga_get_portal_state

Retrieve the current portal state, including loaded artifact information and enforcement status for policy verification.

Instructions

Get current portal state, loaded artifact info, and enforcement status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the logic for the aga_get_portal_state tool.
    export async function handleGetPortalState(_args: Record<string, never>, ctx: ServerContext) {
      return ctx.json({
        state: ctx.portal.state,
        artifact_loaded: !!ctx.portal.artifact,
        sealed_hash: ctx.portal.artifact?.sealed_hash ?? null,
        ttl_seconds: ctx.portal.artifact?.enforcement_parameters.ttl_seconds ?? null,
        issued_at: ctx.portal.artifact?.issued_timestamp ?? null,
        enforcement_triggers: ctx.portal.artifact?.enforcement_parameters.enforcement_triggers ?? [],
        sequence_counter: ctx.portal.sequenceCounter,
        quarantine_active: ctx.quarantine?.active ?? false,
        verification_tier: ctx.verificationTier,
        measurement_count: ctx.measurementCount,
      });
    }
  • src/server.ts:167-171 (registration)
    The registration of the aga_get_portal_state tool in the MCP server setup.
    server.tool('aga_get_portal_state',
      'Get current portal state, loaded artifact info, and enforcement status.',
      {},
      async () => handleGetPortalState({} as any, ctx),
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Get'), but doesn't specify permissions needed, rate limits, whether it's idempotent, or what the return format looks like (e.g., structured data or raw output). This leaves significant gaps for an agent to understand how to handle the tool's behavior.

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 a single, efficient sentence that front-loads the core purpose without any wasted words. It directly communicates what the tool does in a compact form, making it easy to parse and understand quickly.

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?

Given the tool's complexity (simple read operation with no parameters) and lack of annotations or output schema, the description is minimally adequate. It states what information is retrieved but doesn't cover behavioral aspects like response format or error handling, leaving room for improvement in guiding an agent's usage.

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?

The tool has 0 parameters, and schema description coverage is 100%, so there's no need for parameter documentation in the description. The baseline for this scenario is 4, as the description appropriately avoids redundant parameter information and focuses on the tool's purpose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('Get') and resources ('current portal state, loaded artifact info, and enforcement status'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'aga_server_info' or 'aga_quarantine_status', which might provide overlapping or related information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. Given siblings like 'aga_server_info' (general server info) and 'aga_quarantine_status' (specific status), there's no indication of context, prerequisites, or exclusions for selecting this tool over others.

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/attestedintelligence/aga-mcp-server'

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