Skip to main content
Glama
landicefu

Divide and Conquer MCP Server

by landicefu

update_context

Update context information across all tasks to maintain consistency and alignment in complex workflows.

Instructions

Updates the context information for all tasks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_for_all_tasksYesThe new context information for all tasks

Implementation Reference

  • The handler function that implements the logic for the 'update_context' tool. It validates input, reads current task data, updates the context_for_all_tasks field, persists the changes, and returns a success or error response.
    // Update the context for all tasks
    private async updateContext(args: any): Promise<any> {
      if (!args?.context_for_all_tasks) {
        throw new McpError(ErrorCode.InvalidParams, 'Context for all tasks is required');
      }
    
      try {
        const taskData = await this.readTaskData();
        
        // Update the context for all tasks
        taskData.context_for_all_tasks = args.context_for_all_tasks;
        
        // Write the updated task data to the file
        await this.writeTaskData(taskData);
        
        return {
          content: [
            {
              type: 'text',
              text: 'Context updated successfully.',
            },
          ],
        };
      } catch (error) {
        console.error('Error updating context:', error);
        return {
          content: [
            {
              type: 'text',
              text: `Error updating context: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
          isError: true,
        };
      }
    }
  • The input schema definition for the 'update_context' tool, specifying that it takes a 'context_for_all_tasks' string.
    {
      name: 'update_context',
      description: 'Updates the context information for all tasks.',
      inputSchema: {
        type: 'object',
        properties: {
          context_for_all_tasks: {
            type: 'string',
            description: 'The new context information for all tasks'
          }
        },
        required: ['context_for_all_tasks']
      }
    },
  • src/index.ts:428-429 (registration)
    The switch case in the CallToolRequestSchema handler that dispatches calls to the 'update_context' tool to the updateContext method.
    case 'update_context':
      return await this.updateContext(request.params.arguments);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is an update operation but doesn't specify whether this affects all tasks globally, requires special permissions, is reversible, or has side effects. For a mutation tool with zero annotation coverage, this leaves critical behavioral traits undocumented.

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 states the core functionality without unnecessary words. It's appropriately sized for a simple tool with one parameter and gets straight to the point with zero wasted text.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'context information' means, how it differs from metadata or task descriptions, what the update affects, or what happens after invocation. Given the complexity implied by affecting 'all tasks', more context is needed.

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 parameter 'context_for_all_tasks' is already documented in the schema. The description doesn't add any additional meaning about the parameter's format, constraints, or examples beyond what the schema provides, meeting the baseline for high schema coverage.

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 verb ('Updates') and resource ('context information for all tasks'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'update_metadata' or 'update_task_description' which also update aspects of tasks, leaving some ambiguity about scope boundaries.

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 like 'update_metadata' or 'update_task_description'. It doesn't mention prerequisites, exclusions, or specific scenarios where this tool is appropriate, leaving the agent to guess based on tool names alone.

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/landicefu/divide-and-conquer-mcp-server'

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