Skip to main content
Glama
MushroomFleet

DeepLucid3D UCPF Server

manage_state

Control UCPF processing states by enabling, disabling, resetting, or checking status using a session-specific context for targeted cognitive operations.

Instructions

Control the state management for UCPF processing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesThe state management action to perform
session_idNoOptional session ID to target a specific session

Implementation Reference

  • The handler function that executes the manage_state tool logic. It processes actions such as enable, disable, reset, and status on the state management system.
    case "manage_state": {
      // Validate required parameters
      if (!args?.action || typeof args.action !== "string") {
        throw new McpError(
          ErrorCode.InvalidParams,
          "Required parameter 'action' must be a string"
        );
      }
      
      const action = args.action as "enable" | "disable" | "reset" | "status";
      const sessionId = args.session_id as string | undefined;
      
      let resultText = "";
      
      switch (action) {
        case "enable":
          stateManager.setEnabled(true);
          ucpfCore.setStateEnabled(true);
          stateManager.setState("global", { enabled: true });
          resultText = "State management has been enabled";
          break;
          
        case "disable":
          stateManager.setEnabled(false);
          ucpfCore.setStateEnabled(false);
          resultText = "State management has been disabled";
          break;
          
        case "reset":
          if (sessionId) {
            stateManager.clearSession(sessionId);
            resultText = `Session '${sessionId}' has been reset`;
          } else {
            stateManager.clearAllSessions();
            resultText = "All sessions have been reset";
          }
          break;
          
        case "status":
          const sessionCount = stateManager.getSessionCount();
          const isEnabled = Boolean(stateManager.getState("global")?.enabled);
          resultText = `State management is currently ${isEnabled ? "enabled" : "disabled"}\n`;
          resultText += `Number of active sessions: ${sessionCount}`;
          if (sessionId) {
            const hasSession = stateManager.hasSession(sessionId);
            resultText += `\nSession '${sessionId}': ${hasSession ? "exists" : "not found"}`;
          }
          break;
          
        default:
          throw new McpError(
            ErrorCode.InvalidParams,
            `Invalid action: ${action}`
          );
      }
      
      return {
        content: [
          {
            type: "text",
            text: resultText
          }
        ]
      };
    }
  • The input schema and description for the manage_state tool, defining the expected parameters and their types.
    {
      name: "manage_state",
      description: "Control the state management for UCPF processing",
      inputSchema: {
        type: "object",
        properties: {
          action: {
            type: "string",
            enum: ["enable", "disable", "reset", "status"],
            description: "The state management action to perform"
          },
          session_id: {
            type: "string",
            description: "Optional session ID to target a specific session"
          }
        },
        required: ["action"]
      }
    }
  • src/index.ts:333-420 (registration)
    The registration of the manage_state tool in the ListToolsRequestSchema handler, where it is listed among available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: "analyze_problem",
            description: "Process a problem statement through the full UCPF framework",
            inputSchema: {
              type: "object",
              properties: {
                problem: {
                  type: "string",
                  description: "The problem statement to analyze"
                },
                session_id: {
                  type: "string",
                  description: "Optional session ID for maintaining state between calls"
                },
                enable_state: {
                  type: "boolean",
                  description: "Whether to enable state management for this analysis",
                  default: false
                },
                detailed: {
                  type: "boolean",
                  description: "Whether to include detailed analysis",
                  default: false
                }
              },
              required: ["problem"]
            }
          },
          {
            name: "creative_exploration",
            description: "Generate novel perspectives and connections for a topic",
            inputSchema: {
              type: "object",
              properties: {
                topic: {
                  type: "string",
                  description: "The topic or problem to explore creatively"
                },
                constraints: {
                  type: "array",
                  items: {
                    type: "string"
                  },
                  description: "Optional constraints or parameters to consider"
                },
                perspective_count: {
                  type: "number",
                  description: "Number of perspectives to generate",
                  default: 3
                },
                include_metaphors: {
                  type: "boolean",
                  description: "Whether to include metaphorical thinking",
                  default: true
                },
                session_id: {
                  type: "string",
                  description: "Optional session ID for maintaining state between calls"
                }
              },
              required: ["topic"]
            }
          },
          {
            name: "manage_state",
            description: "Control the state management for UCPF processing",
            inputSchema: {
              type: "object",
              properties: {
                action: {
                  type: "string",
                  enum: ["enable", "disable", "reset", "status"],
                  description: "The state management action to perform"
                },
                session_id: {
                  type: "string",
                  description: "Optional session ID to target a specific session"
                }
              },
              required: ["action"]
            }
          }
        ]
      };
    });
Behavior2/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 mentions 'control' and actions like 'enable', 'disable', 'reset', and 'status', implying mutation capabilities, but doesn't specify permissions needed, side effects (e.g., data loss on reset), rate limits, or response format. This leaves critical behavioral traits undocumented for a tool that appears to modify system state.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized for a tool with two parameters, though it could be more front-loaded with key details given the lack of annotations and output schema.

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?

Given the complexity implied by state management actions (including mutations like 'disable' and 'reset'), no annotations, and no output schema, the description is incomplete. It doesn't cover behavioral risks, response expectations, or error conditions, leaving significant gaps for the agent to operate safely and effectively.

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%, with clear documentation for both parameters (action with enum values and optional session_id). The description adds no additional parameter semantics beyond what the schema provides, such as explaining what 'reset' entails or when to use session_id. This meets the baseline of 3 since the schema does the heavy lifting.

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

Purpose3/5

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

The description states the tool 'Control[s] the state management for UCPF processing', which provides a general purpose (state management) and domain (UCPF processing) but lacks specificity about what 'state management' entails or what resources are affected. It doesn't distinguish from sibling tools like 'analyze_problem' or 'creative_exploration', leaving the agent to infer differences based on tool names alone.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, typical scenarios, or exclusions, and there's no comparison to sibling tools. The agent must rely solely on the tool name and input schema to infer usage context.

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

Related 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/MushroomFleet/DeepLucid3D-MCP'

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