Skip to main content
Glama

get-active-toolset

Retrieve detailed information about the currently active toolset, including availability status, to enhance tool selection and usage efficiency on the hypertool-mcp server.

Instructions

Get detailed information about the currently equipped toolset including availability status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolsetNoToolset information (only present if equipped)
equippedYesWhether a toolset is currently equipped
warningsYesList of warnings
toolSummaryNoTool summary information
exposedToolsYesTools grouped by server
serverStatusNoServer status summary
unavailableServersYesList of unavailable server names

Implementation Reference

  • Tool module factory and handler for get-active-toolset. Delegates to active personaManager or toolsetManager.getActiveToolset() and formats response.
    export const createGetActiveToolsetModule: ToolModuleFactory = (
      deps
    ): ToolModule => {
      return {
        toolName: "get-active-toolset",
        definition: getActiveToolsetDefinition,
        handler: async (
          // eslint-disable-next-line @typescript-eslint/no-unused-vars
          args: any
        ) => {
          // Route to appropriate delegate based on persona activation state
          const activePersona = deps.personaManager?.getActivePersona();
    
          let result;
          if (activePersona && deps.personaManager) {
            // PersonaManager is active, use it as delegate
            result = await deps.personaManager.getActiveToolset();
          } else {
            // Use ToolsetManager as delegate
            result = await deps.toolsetManager.getActiveToolset();
          }
    
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(result),
              },
            ],
            structuredContent: result,
          };
        },
      };
    };
  • Tool definition including input/output schemas (empty input, references getActiveToolsetResponseSchema)
    export const getActiveToolsetDefinition: Tool = {
      name: "get-active-toolset",
      description:
        "Get detailed information about the currently equipped toolset including availability status",
      inputSchema: {
        type: "object" as const,
        properties: {},
        additionalProperties: false,
      },
      outputSchema: getActiveToolsetResponseSchema as any,
    };
  • Zod schema definition for GetActiveToolsetResponse and JSON schema conversion used as outputSchema
    export const getActiveToolsetResponseZodSchema = z.object({
      equipped: z.boolean().describe("Whether a toolset is currently equipped"),
      toolset: toolsetInfoZodSchema
        .optional()
        .describe("Toolset information (only present if equipped)"),
      serverStatus: z
        .object({
          totalConfigured: z
            .number()
            .describe("Total number of configured servers"),
          enabled: z.number().describe("Number of enabled servers"),
          available: z.number().describe("Number of available servers"),
          unavailable: z.number().describe("Number of unavailable servers"),
          disabled: z.number().describe("Number of disabled servers"),
        })
        .optional()
        .describe("Server status summary"),
      toolSummary: z
        .object({
          currentlyExposed: z
            .number()
            .describe("Number of tools currently exposed"),
          totalDiscovered: z.number().describe("Total number of discovered tools"),
          filteredOut: z.number().describe("Number of tools filtered out"),
        })
        .optional()
        .describe("Tool summary information"),
      exposedTools: z
        .record(z.array(toolInfoResponseZodSchema))
        .describe("Tools grouped by server with full details"),
      unavailableServers: z
        .array(z.string())
        .describe("List of unavailable server names"),
      warnings: z.array(z.string()).describe("List of warnings"),
      context: contextInfoZodSchema
        .optional()
        .describe("Context usage information for the exposed tools"),
    });
    
    /**
     * TypeScript types inferred from Zod schemas
     */
    export type ContextInfo = z.infer<typeof contextInfoZodSchema>;
    export type ToolInfoResponse = z.infer<typeof toolInfoResponseZodSchema>;
    export type ListSavedToolsetsResponse = z.infer<
      typeof listSavedToolsetsResponseZodSchema
    >;
    export type BuildToolsetResponse = z.infer<
      typeof buildToolsetResponseZodSchema
    >;
    export type EquipToolsetResponse = z.infer<
      typeof equipToolsetResponseZodSchema
    >;
    export type GetActiveToolsetResponse = z.infer<
      typeof getActiveToolsetResponseZodSchema
    >;
    
    /**
     * JSON Schemas generated from Zod schemas using zod-to-json-schema
     * Note: Using $refStrategy: 'none' to avoid $ref definitions for MCP compatibility
     */
    export const serverConfigSchema = zodToJsonSchema(serverConfigZodSchema, {
      $refStrategy: "none",
    });
    
    export const toolsetInfoSchema = zodToJsonSchema(toolsetInfoZodSchema, {
      $refStrategy: "none",
    });
    
    export const listSavedToolsetsResponseSchema = zodToJsonSchema(
      listSavedToolsetsResponseZodSchema,
      {
        $refStrategy: "none",
      }
    );
    
    export const buildToolsetResponseSchema = zodToJsonSchema(
      buildToolsetResponseZodSchema,
      {
        $refStrategy: "none",
      }
    );
    
    export const equipToolsetResponseSchema = zodToJsonSchema(
      equipToolsetResponseZodSchema,
      {
        $refStrategy: "none",
      }
    );
    
    export const getActiveToolsetResponseSchema = zodToJsonSchema(
      getActiveToolsetResponseZodSchema,
      {
        $refStrategy: "none",
      }
    );
  • Registration of get-active-toolset factory in CONFIG_TOOL_FACTORIES array
    export const CONFIG_TOOL_FACTORIES: ToolModuleFactory[] = [
      createListAvailableToolsModule,
      createBuildToolsetModule,
      createListSavedToolsetsModule,
      createEquipToolsetModule,
      createDeleteToolsetModule,
      createUnequipToolsetModule,
      createGetActiveToolsetModule,
      createAddToolAnnotationModule,
      createListPersonasModule, // Persona management tool
      createExitConfigurationModeModule,
    ];
  • Core getActiveToolset implementation in ToolsetManager providing detailed active toolset information, stats, exposed tools by server, and context tokens.
    async getActiveToolset(): Promise<GetActiveToolsetResponse> {
      if (!this.currentToolset) {
        return {
          equipped: false,
          toolset: undefined,
          serverStatus: undefined,
          toolSummary: undefined,
          exposedTools: {},
          unavailableServers: [],
          warnings: [],
        };
      }
    
      // Convert current toolset to response format
      const toolsetInfo = await this.generateToolsetInfo(this.currentToolset);
    
      // Get discovery engine for tool stats
      const allDiscoveredTools =
        this.discoveryEngine?.getAvailableTools(true) || [];
      const activeDiscoveredTools = this.getActiveDiscoveredTools();
    
      // Calculate context information for active tools
      const totalTokens = tokenCounter.calculateToolsetTokens(
        activeDiscoveredTools
      );
    
      // Group tools by server for exposedTools with full details
      const exposedTools: Record<string, ToolInfoResponse[]> = {};
    
      for (const tool of activeDiscoveredTools) {
        if (!exposedTools[tool.serverName]) {
          exposedTools[tool.serverName] = [];
        }
    
        // Convert discovered tool to ToolInfoResponse with context
        exposedTools[tool.serverName].push(
          tokenCounter.convertToToolInfoResponse(tool, totalTokens)
        );
      }
    
      // Create response with context information at top level
      const response: GetActiveToolsetResponse = {
        equipped: true,
        toolset: toolsetInfo,
        serverStatus: {
          totalConfigured: toolsetInfo.totalServers,
          enabled: toolsetInfo.enabledServers,
          available: toolsetInfo.enabledServers, // Simplified
          unavailable: 0,
          disabled: 0,
        },
        toolSummary: {
          currentlyExposed: activeDiscoveredTools.length,
          totalDiscovered: allDiscoveredTools.length,
          filteredOut: allDiscoveredTools.length - activeDiscoveredTools.length,
        },
        exposedTools,
        unavailableServers: [],
        warnings: [],
        // Add context at top level (for get-active-toolset only)
        context: {
          tokens: totalTokens,
          percentTotal: null, // Not applicable for get-active-toolset
        },
      };
    
      return response;
    }
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 states the tool retrieves information, implying a read-only operation, but doesn't specify if it requires authentication, has rate limits, returns structured data, or handles errors. The description adds minimal context beyond the basic purpose.

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 ('Get detailed information about the currently equipped toolset') and adds a clarifying detail ('including availability status'). There is zero waste, and every word earns its place.

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 has 0 parameters, 100% schema coverage, and an output schema exists (so return values are documented elsewhere), the description is minimally adequate. However, as a read operation with no annotations, it lacks behavioral details like authentication needs or error handling, leaving some gaps in context.

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 no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here. Baseline is 4 for zero parameters, as it avoids unnecessary complexity.

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 ('Get detailed information') and resource ('currently equipped toolset'), specifying what information is retrieved ('including availability status'). It distinguishes from siblings like 'list-available-tools' or 'list-saved-toolsets' by focusing on the currently equipped toolset, though it doesn't explicitly contrast them.

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. It doesn't mention prerequisites (e.g., needing an equipped toolset first), exclusions, or compare it to siblings like 'list-available-tools' for broader listings. Usage is implied by the purpose but not explicitly stated.

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/toolprint/hypertool-mcp'

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