Skip to main content
Glama

list_available_contexts

View all loaded context categories and their descriptions to understand available persistent tool settings across chat sessions.

Instructions

List all loaded context categories and their descriptions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'list_available_contexts' tool handler retrieves context information from the engine, transforms it into a summary (including tool_category, description, priority, and applies_to), and returns it as a JSON-formatted string.
    case 'list_available_contexts': {
      const contexts = engine.getContexts();
      const list = Array.from(contexts.values()).map((c) => ({
        tool_category: c.tool_category,
        description: c.description,
        priority: c.metadata.priority ?? 'medium',
        applies_to: c.metadata.applies_to_tools,
      }));
      return { content: [{ type: 'text', text: JSON.stringify(list, null, 2) }] };
    }
  • The tool 'list_available_contexts' is defined and registered in the MCP server's listTools response.
    {
      name: 'list_available_contexts',
      description: 'List all loaded context categories and their descriptions',
      inputSchema: {
        type: 'object' as const,
        properties: {},
      },
    },

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/doobidoo/MCP-Context-Provider'

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