Skip to main content
Glama
self-tech-labs

Entscheidsuche MCP Server

List Available Courts

list_courts

Retrieve details of available courts and their document counts to access Swiss legal decisions via the entscheidsuche.ch API.

Instructions

Get information about available courts and their document counts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'list_courts' tool. Calls client.getCourtStatus() to fetch court statuses, formats as JSON text response, handles errors.
    async () => {
      try {
        const courts = await client.getCourtStatus();
        return {
          content: [
            {
              type: "text",
              text: `Available Courts:\n\n${JSON.stringify(courts, null, 2)}`
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error retrieving court information: ${error instanceof Error ? error.message : String(error)}`
            }
          ],
          isError: true
        };
      }
    }
  • TypeScript interface defining the structure of court status objects returned by the tool.
    interface CourtStatus {
      name: string;
      total_documents: number;
      new_documents: number;
      last_run: string;
      status: string;
    }
  • src/index.ts:343-373 (registration)
    Registration of the 'list_courts' tool with server.registerTool, providing title, description, empty input schema, and handler reference.
    server.registerTool(
      "list_courts",
      {
        title: "List Available Courts",
        description: "Get information about available courts and their document counts",
        inputSchema: {}
      },
      async () => {
        try {
          const courts = await client.getCourtStatus();
          return {
            content: [
              {
                type: "text",
                text: `Available Courts:\n\n${JSON.stringify(courts, null, 2)}`
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error retrieving court information: ${error instanceof Error ? error.message : String(error)}`
              }
            ],
            isError: true
          };
        }
      }
    );
  • Supporting method getCourtStatus() in EntscheidungsucheClient class, currently provides mock data for court statuses.
    async getCourtStatus(): Promise<CourtStatus[]> {
      // This would need to be implemented by scraping the status page
      // For now, return a mock response
      return [
        {
          name: "Bundesgericht",
          total_documents: 15000,
          new_documents: 45,
          last_run: "2024-01-15",
          status: "Komplett gelesen"
        }
      ];
    }
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. It mentions 'Get information' but doesn't disclose behavioral traits such as whether this is a read-only operation, potential rate limits, authentication needs, or what format the information is returned in. The description is minimal and lacks essential context for safe invocation.

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 directly states the tool's purpose without any fluff or unnecessary details. It is front-loaded and appropriately sized for a simple tool with no parameters.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'information' includes (e.g., court names, IDs, document counts), how results are structured, or any limitations. For a tool that returns data, more context is needed to guide the agent effectively.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, and since there are none, it meets the baseline of 4 for not introducing confusion or redundancy.

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' and the resource 'information about available courts and their document counts', which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'search_case_law', which might also involve court information but with different functionality.

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 like 'search_case_law'. It lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage based on the tool name and description alone.

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/self-tech-labs/entscheidsuche-MCP-server'

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