Skip to main content
Glama

get_sites

Retrieve all Webflow sites accessible to your authenticated account to manage and view your portfolio.

Instructions

Retrieve a list of all Webflow sites accessible to the authenticated user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_sites' tool. It uses WebflowClient to list all sites, formats them with details like ID, name, workspace, dates, and preview URL, and returns formatted text content.
      get_sites: async () => {
        try {
          const webflow = new WebflowClient({ accessToken });
          const { sites } = await webflow.sites.list();
    
          if (!Array.isArray(sites) || sites.length === 0) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: "No sites found for this account.",
                },
              ],
            };
          }
    
          const formattedSites = sites
            .map(
              (site) => `
    • Site: ${site.displayName}
      - ID: ${site.id}
      - Workspace: ${site.workspaceId}
      - Created: ${formatDate(site?.createdOn)}
      - Last Published: ${formatDate(site?.lastPublished)}
      - Preview URL: ${site.previewUrl || "N/A"}
    `
            )
            .join("\n");
    
          return {
            content: [
              {
                type: "text" as const,
                text: `Found ${sites.length} sites:\n${formattedSites}`,
              },
            ],
          };
        } catch (error: unknown) {
          console.error("Error fetching sites:", error);
          throw new Error("Failed to fetch sites list");
        }
      },
  • src/index.ts:76-85 (registration)
    Tool registration entry in TOOL_DEFINITIONS array, which is returned in response to ListToolsRequest. Includes name, description, and empty input schema.
    {
      name: "get_sites",
      description:
        "Retrieve a list of all Webflow sites accessible to the authenticated user",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • Zod schema definition for get_sites tool input validation (accepts no parameters).
    getSites: z.object({}),
  • Utility helper function used by the get_sites handler to format creation and last published dates.
    function formatDate(date: Date | undefined | null): string {
      if (!date) return "N/A";
      return date.toLocaleString();
    }
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 of behavioral disclosure. It mentions authentication requirements, which is useful context. However, it lacks details on behavioral traits such as rate limits, pagination, error handling, or what 'accessible' entails (e.g., permissions, workspace scoping). For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 that efficiently conveys the tool's purpose and key constraint (authentication). It is front-loaded with the main action and resource, with no wasted words or redundant information. Every part of the sentence earns its place by adding value.

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?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but has clear gaps. It covers the basic purpose and authentication context but lacks details on output format (e.g., structure of the list), error cases, or limitations. Without annotations or output schema, the description should ideally provide more behavioral context to be fully complete for an AI agent.

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 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. A baseline of 4 is applied since no parameters exist, and the description doesn't introduce confusion about inputs.

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 'retrieve' and resource 'list of all Webflow sites', making the purpose specific and understandable. It distinguishes from the sibling 'get_site' by indicating it returns a list rather than a single site, though it doesn't explicitly name the alternative. The description is not tautological and provides meaningful context about what the tool does.

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 by specifying 'accessible to the authenticated user', suggesting it should be used when needing all sites the user can access. However, it doesn't provide explicit guidance on when to use this vs. the sibling 'get_site' or other alternatives, nor does it mention any exclusions or prerequisites beyond authentication. The usage context is implied but not fully articulated.

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

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