Skip to main content
Glama

colony_convene_request

Submit, view, or review agent-initiated session convene requests for a colony charter. Elders approve or reject requests to govern sessions.

Instructions

Colony Autonomy: Request, list, or review agent-initiated session convene requests. Actions: request (citizen+ can request a governed session), list (view pending/all requests for a charter), review (elder+ approve/reject a request). Tier-gated: agents earn the right to request and approve sessions through demonstrated merit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction: request = submit a convene request; list = view requests; review = approve/reject a request
charter_idYesCharter ID for the request
institution_idNoInstitution ID (required for request action)
topicNoTopic for the requested session (required for request action)
rationaleNoWhy this session is needed
urgencyNoUrgency level (default: normal)
request_idNoConvene request ID (required for review action)
decisionNoReview decision (required for review action)
notesNoReview notes
status_filterNoFilter for list action

Implementation Reference

  • The main handler function for the colony_convene_request MCP tool. Implements request, list, and review actions by making HTTP calls to the GIA API. Registered via server.tool('colony_convene_request', ...).
    server.tool(
      'colony_convene_request',
      'Colony Autonomy: Request, list, or review agent-initiated session convene requests. Actions: request (citizen+ can request a governed session), list (view pending/all requests for a charter), review (elder+ approve/reject a request). Tier-gated: agents earn the right to request and approve sessions through demonstrated merit.',
      {
        action: z.enum(['request', 'list', 'review']).describe(
          'Action: request = submit a convene request; list = view requests; review = approve/reject a request'
        ),
        charter_id: z.string().describe('Charter ID for the request'),
        institution_id: z.string().optional().describe('Institution ID (required for request action)'),
        topic: z.string().optional().describe('Topic for the requested session (required for request action)'),
        rationale: z.string().optional().describe('Why this session is needed'),
        urgency: z.enum(['low', 'normal', 'high', 'critical']).optional().describe('Urgency level (default: normal)'),
        request_id: z.string().optional().describe('Convene request ID (required for review action)'),
        decision: z.enum(['approved', 'rejected']).optional().describe('Review decision (required for review action)'),
        notes: z.string().optional().describe('Review notes'),
        status_filter: z.enum(['pending', 'approved', 'rejected', 'convened', 'expired']).optional().describe('Filter for list action'),
      },
      {
        title: 'Colony Convene Request',
        readOnlyHint: false,
        idempotentHint: false,
        destructiveHint: false,
        openWorldHint: false,
      } as Record<string, unknown>,
      async (input) => {
        const apiBase = process.env.GIA_API_URL || 'http://localhost:3001';
        // GIA_INTERNAL_API_KEY = server-side name; GIA_API_KEY = MCP container name (same value)
        const apiKey = process.env.GIA_INTERNAL_API_KEY || process.env.GIA_API_KEY || '';
        let result: Record<string, unknown>;
    
        try {
          const headers: Record<string, string> = {
            'Content-Type': 'application/json',
            'Authorization': `Bearer ${apiKey}`,
          };
    
          if (input.action === 'request') {
            if (!input.topic || !input.institution_id) {
              result = { error: 'topic and institution_id required for request action' };
            } else {
              const resp = await fetch(
                `${apiBase}/api/colony/${encodeURIComponent(input.charter_id)}/convene-request`,
                {
                  method: 'POST',
                  headers,
                  body: JSON.stringify({
                    topic: input.topic,
                    rationale: input.rationale,
                    urgency: input.urgency || 'normal',
                    institutionId: input.institution_id,
                  }),
                },
              );
              result = await resp.json() as Record<string, unknown>;
            }
          } else if (input.action === 'list') {
            const params = new URLSearchParams();
            if (input.status_filter) params.set('status', input.status_filter);
            const resp = await fetch(
              `${apiBase}/api/colony/${encodeURIComponent(input.charter_id)}/convene-requests?${params}`,
              { headers },
            );
            result = await resp.json() as Record<string, unknown>;
          } else if (input.action === 'review') {
            if (!input.request_id || !input.decision) {
              result = { error: 'request_id and decision required for review action' };
            } else {
              const resp = await fetch(
                `${apiBase}/api/colony/${encodeURIComponent(input.charter_id)}/convene-request/${encodeURIComponent(input.request_id)}/review`,
                {
                  method: 'POST',
                  headers,
                  body: JSON.stringify({ decision: input.decision, notes: input.notes }),
                },
              );
              result = await resp.json() as Record<string, unknown>;
            }
          } else {
            result = { error: 'Unknown action' };
          }
        } catch (err: unknown) {
          result = { error: `Colony convene request failed: ${(err as Error).message}` };
        }
    
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
        };
      },
    );
  • Zod schema defining input parameters for colony_convene_request: action (enum: request/list/review), charter_id, institution_id, topic, rationale, urgency, request_id, decision, notes, status_filter.
    {
      action: z.enum(['request', 'list', 'review']).describe(
        'Action: request = submit a convene request; list = view requests; review = approve/reject a request'
      ),
      charter_id: z.string().describe('Charter ID for the request'),
      institution_id: z.string().optional().describe('Institution ID (required for request action)'),
      topic: z.string().optional().describe('Topic for the requested session (required for request action)'),
      rationale: z.string().optional().describe('Why this session is needed'),
      urgency: z.enum(['low', 'normal', 'high', 'critical']).optional().describe('Urgency level (default: normal)'),
      request_id: z.string().optional().describe('Convene request ID (required for review action)'),
      decision: z.enum(['approved', 'rejected']).optional().describe('Review decision (required for review action)'),
      notes: z.string().optional().describe('Review notes'),
      status_filter: z.enum(['pending', 'approved', 'rejected', 'convened', 'expired']).optional().describe('Filter for list action'),
    },
  • Export of registerColonyTools function which registers colony_convene_request and other colony tools on the McpServer.
    export function registerColonyTools(server: McpServer, engine: GovernanceEngine): void {
  • Registration entry in the TOOL_REGISTRY mapping registerColonyTools to the 'tenant' visibility tier, making colony_convene_request (and other colony tools) available to tenant-level sessions.
    { tier: 'tenant', register: registerColonyTools, description: 'colony (convene_request, suggestion, health — Colony Autonomy)' },
  • Import of registerColonyTools from ./tools/colony.js into the MCP server module.
    import { registerColonyTools } from './tools/colony.js';
Behavior4/5

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

The description adds behavioral context beyond annotations: it explains that actions are tier-gated (agents earn rights through merit). Annotations indicate readOnlyHint=false and destructiveHint=false, consistent with the description's mix of read (list) and write (request, review) operations. No contradictions.

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 concise, consisting of three sentences. The first sentence states the overall purpose, the second breaks down the actions, and the third adds important context about tier-gating. No unnecessary words, every sentence earns its place.

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?

The description covers the tool's functionality, actions, and authorization context. It lacks information about return values or error handling, but given the absence of an output schema, the description provides enough for an agent to understand how to invoke the tool correctly. The parameter descriptions in the schema fill in the rest.

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 input schema has 100% description coverage with detailed parameter descriptions. The tool description adds semantic value by specifying which parameters are required for each action (e.g., institution_id and topic for request; request_id and decision for review). This helps agents understand conditional requirements beyond the schema's general descriptions.

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 clearly states the tool's purpose: 'Request, list, or review agent-initiated session convene requests.' It lists three specific actions (request, list, review) with brief explanations. The description differentiates from sibling tools by focusing on convene requests in a colony autonomy context, which is unique among the sibling tools.

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?

The description provides context on who can perform each action: 'citizen+ can request a governed session', 'elder+ approve/reject a request'. It also mentions tier-gating, guiding agents on eligibility. While it doesn't explicitly state when not to use this tool versus alternatives, the three actions are self-contained and cover the main use cases.

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/knowledgepa3/gia-mcp-server'

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