Skip to main content
Glama
AgentBase1
by AgentBase1

list_categories

Retrieve all available categories in the OpenClaw registry to identify instruction file types, including file counts and descriptions.

Instructions

List all categories in the OpenClaw registry with file counts and descriptions. Use this to understand what types of instruction files are available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handleListCategories() function implements the list_categories tool logic. It fetches the registry index, counts files per category, and returns a formatted list of categories with descriptions and file counts.
    async function handleListCategories() {
      const index = await fetchIndex();
      const entries = index.entries || [];
    
      const categoryInfo = {
        'system-prompts': 'Full agent identity and behavior definitions — the complete personality and rules for an agent',
        'skills': 'Scoped capability modules for specific tasks — drop into any agent to add a capability',
        'workflows': 'Multi-step sequential or conditional process instructions',
        'tool-definitions': 'Function schemas, API patterns, and tool usage instructions',
        'domain-packs': 'Deep field context — industry knowledge, terminology, and domain standards',
        'safety-filters': 'Output validation, content filtering, and harm detection patterns',
        'orchestration': 'Multi-agent coordination and handoff protocols'
      };
    
      const counts = {};
      for (const cat of index.categories) counts[cat] = 0;
      for (const e of entries) {
        if (counts[e.category] !== undefined) counts[e.category]++;
      }
    
      const lines = index.categories.map(cat => {
        const count = counts[cat] || 0;
        const desc = categoryInfo[cat] || '';
        return `**${cat}** (${count} file${count === 1 ? '' : 's'})\n  ${desc}`;
      });
    
      return {
        content: [{
          type: 'text',
          text: `OpenClaw Registry — ${index.count} total files\n\n${lines.join('\n\n')}\n\nUse search_registry with category filter to browse files in any category.`
        }]
      };
    }
  • The tool definition in the TOOLS array specifying the name 'list_categories', description, and inputSchema (empty properties object - takes no parameters).
    {
      name: 'list_categories',
      description: 'List all categories in the OpenClaw registry with file counts and descriptions. Use this to understand what types of instruction files are available.',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
  • index.js:259-263 (registration)
    The switch statement in the CallToolRequestSchema handler that dispatches the 'list_categories' tool call to the handleListCategories function.
    switch (name) {
      case 'search_registry': return await handleSearchRegistry(args || {});
      case 'get_instruction': return await handleGetInstruction(args || {});
      case 'list_categories': return await handleListCategories();
      case 'get_featured': return await handleGetFeatured();
  • index.js:253-253 (registration)
    Server registration of the TOOLS array via ListToolsRequestSchema handler, which exposes list_categories to MCP clients.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: 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/AgentBase1/mcp-server'

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