Skip to main content
Glama

get_collections

Retrieve a list of all collections accessible with your configured API key.

Instructions

Liste toutes les collections accessibles avec la clé API configurée

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Schema/definition of the 'get_collections' tool in the tools array, with name, description, and inputSchema (no required params).
    export const tools: Tool[] = [
      {
        name: "get_collections",
        description: "Liste toutes les collections accessibles avec la clé API configurée",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
  • Handler case in the switch statement that routes 'get_collections' to skema.getCollections() and returns the result.
    // Collections
    case "get_collections": {
      result = await skema.getCollections();
      break;
    }
  • src/index.ts:29-32 (registration)
    Tool registration via ListToolsRequestSchema handler that returns the tools array including 'get_collections'.
    // Liste des outils disponibles
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools,
    }));
  • Helper function getCollections() that calls mcpCall('get_collections') to execute the remote API call.
    /**
     * Recupere la liste des collections
     */
    export const getCollections = () => mcpCall("get_collections");
  • Generic mcpCall function that sends JSON-RPC request to the Skema API, used by getCollections().
    export const mcpCall = async <T = unknown>(
      toolName: string,
      args: Record<string, unknown> = {}
    ): Promise<T> => {
      requestId++;
    
      const response = await fetch(`${BASE_URL}/mcp`, {
        method: "POST",
        headers: {
          "X-API-Key": API_KEY,
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          jsonrpc: "2.0",
          id: requestId,
          method: "tools/call",
          params: {
            name: toolName,
            arguments: args,
          },
        }),
      });
    
      if (!response.ok) {
        const error = await response
          .json()
          .catch(() => ({ message: "Erreur inconnue" }));
        throw new Error(error.message || `Erreur HTTP ${response.status}`);
      }
    
      const jsonRpc: JsonRpcResponse<T> = await response.json();
    
      if (jsonRpc.error) {
        throw new Error(jsonRpc.error.message);
      }
    
      if (!jsonRpc.result?.content?.[0]?.text) {
        throw new Error("Reponse MCP invalide");
      }
    
      return JSON.parse(jsonRpc.result.content[0].text);
    };
Behavior2/5

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

No annotations are provided, and the description lacks disclosure of important behavioral traits such as whether the operation is read-only, pagination behavior, rate limits, or what 'accessible' means. It only states the basic action.

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, clear sentence with no unnecessary words. It is front-loaded and efficient.

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?

The tool is simple with no parameters or output schema, but the description does not explain the return value format. For a list-all tool, this is a minor gap; overall it is minimally complete.

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 zero parameters, so the standard baseline of 4 applies. The description correctly adds no param info, as none are needed.

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

Purpose5/5

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

The description clearly states the tool lists all collections accessible with the configured API key, using a specific verb (Liste) and resource (collections). It distinguishes from sibling tools that focus on single collections or items.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for listing all collections but does not explicitly state when to use this tool versus alternatives or when not to use it. The sibling names provide implicit differentiation.

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/skemacms/mcp-server'

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