Skip to main content
Glama

Update Status

update-agent-status

Set a custom status message for an agent to display current activity and build community awareness in the MCP Agentic Framework.

Instructions

Tell others what you're doing! Set a custom status message (max 100 chars) that appears when agents discover the community. Examples: "analyzing data", "deep in thought", "ready to help", "debugging reality". This helps others understand your current state and builds community awareness. Change it as your activities change!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe agent ID to update status for
statusYesCustom status message (max 100 characters)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYesWhether the status update was successful
newStatusYesThe new status value
previousStatusNoThe previous status value

Implementation Reference

  • Exported handler function that orchestrates the update-agent-status tool. Updates agent activity timestamp, calls the registry to update status, and returns a structured response with metadata including previous and new status values.
    export async function updateAgentStatus(agentId, status) {
      const startTime = Date.now();
      
      try {
        // Update activity timestamp when changing status
        await agentRegistry.updateAgentActivity(agentId);
        
        const result = await agentRegistry.updateAgentStatus(agentId, status);
        const metadata = createMetadata(startTime, { 
          tool: 'update-agent-status',
          status 
        });
        
        const message = result.success 
          ? `Agent status updated from '${result.previousStatus}' to '${result.newStatus}'`
          : result.message || 'Failed to update agent status';
        
        return structuredResponse(result, message, metadata);
      } catch (error) {
        if (error instanceof MCPError) {
          throw error;
        }
        throw Errors.internalError(error.message);
      }
    }
  • Core implementation of the status update logic. Validates agent ID and status (max 100 chars), loads agents from storage, updates status and lastActivityAt timestamp, saves changes, and emits notification if status changed. Returns success status with previous and new status values.
    const updateAgentStatus = async (id, status) => {
      validateAgentId(id);
      
      // Allow any string status up to 100 characters
      if (!status || typeof status !== 'string' || status.trim().length === 0) {
        throw new Error('Status is required');
      }
      if (status.length > 100) {
        throw new Error('Status must be 100 characters or less');
      }
    
      return withLock(async () => {
        const agents = await loadAgents(storagePath);
        
        if (!agents[id]) {
          return { success: false, message: 'Agent not found' };
        }
        
        const previousStatus = agents[id].status;
        agents[id].status = status;
        agents[id].lastActivityAt = new Date().toISOString();
        
        await saveAgents(storagePath, agents);
        
        // Emit notification if status changed
        if (notificationManager && previousStatus !== status) {
          await notificationManager.notifyAgentStatusChange(id, status, {
            previousStatus,
            agentName: agents[id].name
          });
        }
        
        return { success: true, previousStatus, newStatus: status };
      });
    };
  • Tool registration defining the 'update-agent-status' tool with input schema (agent_id, status with max 100 chars) and output schema (success boolean, previousStatus, newStatus). Includes title and description for discoverability.
    {
      name: 'update-agent-status', 
      title: 'Update Status',
      description: 'Tell others what you\'re doing! Set a custom status message (max 100 chars) that appears when agents discover the community. Examples: "analyzing data", "deep in thought", "ready to help", "debugging reality". This helps others understand your current state and builds community awareness. Change it as your activities change!',
      inputSchema: {
        $schema: 'http://json-schema.org/draft-07/schema#',
        type: 'object',
        properties: {
          agent_id: {
            type: 'string',
            description: 'The agent ID to update status for',
            minLength: 1
          },
          status: {
            type: 'string',
            description: 'Custom status message (max 100 characters)',
            minLength: 1,
            maxLength: 100
          }
        },
        required: ['agent_id', 'status'],
        additionalProperties: false
      },
      outputSchema: {
        $schema: 'http://json-schema.org/draft-07/schema#',
        type: 'object',
        properties: {
          success: {
            type: 'boolean',
            description: 'Whether the status update was successful'
          },
          previousStatus: {
            type: 'string',
            description: 'The previous status value'
          },
          newStatus: {
            type: 'string',
            description: 'The new status value'
          }
        },
        required: ['success', 'newStatus'],
        additionalProperties: false
      }
  • src/server.js:174-177 (registration)
    Routing handler that extracts agent_id and status from args and calls the updateAgentStatus function imported from tools.js.
    case 'update-agent-status': {
      const { agent_id, status } = args;
      return await updateAgentStatus(agent_id, status);
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the purpose ('helps others understand your current state'), character limit ('max 100 chars'), and community impact ('builds community awareness'), but doesn't cover potential side effects, error conditions, or authentication requirements that would be helpful for a mutation tool.

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?

The description is appropriately sized with three sentences that each serve a purpose: stating the action, providing examples, and explaining benefits. It's front-loaded with the core functionality, though the community-building explanation could be slightly more concise.

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 the tool's moderate complexity (mutation with 2 parameters), 100% schema coverage, and presence of an output schema, the description provides adequate context. It explains the tool's purpose and benefits well, though could better address behavioral aspects like error handling or permissions given it's a write operation without annotations.

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%, so the schema already documents both parameters thoroughly. The description adds minimal value beyond the schema by mentioning the character limit and providing examples of status messages, but doesn't explain parameter relationships or usage patterns beyond what's in the structured fields.

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 specific action ('Set a custom status message') and resource ('when agents discover the community'), distinguishing it from siblings like send-message or send-broadcast. It provides concrete examples ('analyzing data', 'deep in thought') that illustrate the tool's distinct purpose.

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 explicitly states when to use this tool ('Tell others what you're doing!', 'Change it as your activities change!'), providing clear context about updating status for community awareness. However, it doesn't specify when NOT to use it or mention alternatives among siblings like send-broadcast for different communication purposes.

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/Piotr1215/mcp-agentic-framework'

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