Skip to main content
Glama

tacit_list_sites

Discover available building sites to access building data, equipment, and sensor information through the Tacit MCP server.

Instructions

List all building sites the current API key has access to.

Each site represents a physical location (building, campus, warehouse) managed in Tacit. Sites are the top-level container. You need a site ID to query buildings, equipment, points, zones, and systems.

Returns: Array of sites with id, name, address, city, country, timezone.

Use this tool first to discover available sites before querying building data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that fetches sites from the API and formats the output for the "tacit_list_sites" tool.
    async () => {
      try {
        const sites = await restGet<Site[]>("/api/sites/");
        if (!sites.length) {
          return {
            content: [
              {
                type: "text" as const,
                text: "No sites found. Your API key may not have access to any sites.",
              },
            ],
          };
        }
        const lines = [`# Sites (${sites.length})`, ""];
        for (const s of sites) {
          lines.push(`## ${s.name}`);
          lines.push(`- **ID**: \`${s.id}\``);
          lines.push(`- **Address**: ${s.address || "N/A"}`);
          lines.push(
            `- **Location**: ${[s.city, s.country].filter(Boolean).join(", ") || "N/A"}`,
          );
          lines.push(`- **Timezone**: ${s.timezone}`);
          lines.push("");
        }
        return { content: [{ type: "text" as const, text: lines.join("\n") }] };
      } catch (error) {
        return {
          content: [
            {
              type: "text" as const,
              text: `Error: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
          isError: true,
        };
      }
    },
  • Registration of the "tacit_list_sites" tool within the MCP server.
      server.registerTool(
        "tacit_list_sites",
        {
          title: "List Sites",
          description: `List all building sites the current API key has access to.
    
    Each site represents a physical location (building, campus, warehouse) managed in Tacit.
    Sites are the top-level container. You need a site ID to query buildings, equipment, points, zones, and systems.
    
    Returns: Array of sites with id, name, address, city, country, timezone.
    
    Use this tool first to discover available sites before querying building data.`,
          inputSchema: {},
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
          },
        },
        async () => {
          try {
            const sites = await restGet<Site[]>("/api/sites/");
            if (!sites.length) {
              return {
                content: [
                  {
                    type: "text" as const,
                    text: "No sites found. Your API key may not have access to any sites.",
                  },
                ],
              };
            }
            const lines = [`# Sites (${sites.length})`, ""];
            for (const s of sites) {
              lines.push(`## ${s.name}`);
              lines.push(`- **ID**: \`${s.id}\``);
              lines.push(`- **Address**: ${s.address || "N/A"}`);
              lines.push(
                `- **Location**: ${[s.city, s.country].filter(Boolean).join(", ") || "N/A"}`,
              );
              lines.push(`- **Timezone**: ${s.timezone}`);
              lines.push("");
            }
            return { content: [{ type: "text" as const, text: lines.join("\n") }] };
          } catch (error) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `Error: ${error instanceof Error ? error.message : String(error)}`,
                },
              ],
              isError: true,
            };
          }
        },
      );

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/ucl-sbde/tacit-mcp'

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