{
  "name": "knytstudio",
  "version": "1.0.0",
  "description": "KnytStudio is a pattern design and discovery platform for knitting, cross-stitch, crochet, beading and pixel art. These read-only tools let AI agents browse the public community: discover patterns, look up maker profiles, and read public comments and finished-project photos.",
  "tools": [
    {
      "name": "list_patterns",
      "description": "Browse public patterns on KnytStudio. Filter by tag or craft type and sort by newest, popular or trending. Returns a page of patterns with title, craft type, dimensions, tags, engagement counts, a preview image URL and the author. Note: this lists and filters patterns; it does not do free-text keyword search.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "sort": {
            "type": "string",
            "enum": ["newest", "popular", "trending"],
            "description": "Sort order for results. Defaults to newest."
          },
          "type": {
            "type": "string",
            "enum": ["KNITTING", "CROSS_STITCH", "CROCHET", "BEADING", "PIXEL_ART"],
            "description": "Filter to a single craft type."
          },
          "tag": {
            "type": "string",
            "description": "Filter to patterns carrying this tag (max 50 characters)."
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor (a pattern id) returned as nextCursor from a previous call."
          },
          "limit": {
            "type": "number",
            "description": "Number of patterns to return, 1-50. Defaults to 20."
          }
        }
      },
      "endpoint": "/api/discover",
      "method": "GET"
    },
    {
      "name": "get_user_profile",
      "description": "Get a public maker profile by user id: username, avatar, bio, social links, follower/following counts, completed-project count, and their list of public patterns.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The id of the user whose public profile to retrieve."
          }
        },
        "required": ["userId"]
      },
      "endpoint": "/api/users/:userId",
      "method": "GET"
    },
    {
      "name": "get_user_completed_projects",
      "description": "List a maker's completed projects (with the pattern and a finished-project photo when available), newest first, cursor paginated.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The id of the user whose completed projects to retrieve."
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor returned as nextCursor from a previous call."
          },
          "limit": {
            "type": "number",
            "description": "Number of projects to return, up to 50. Defaults to 20."
          }
        },
        "required": ["userId"]
      },
      "endpoint": "/api/users/:userId/completed",
      "method": "GET"
    },
    {
      "name": "get_pattern_comments",
      "description": "Read the public comments on a pattern, newest first, cursor paginated. Returns comment text, timestamps and the commenting user.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "patternId": {
            "type": "string",
            "description": "The id of the pattern whose comments to read."
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor returned as nextCursor from a previous call."
          },
          "limit": {
            "type": "number",
            "description": "Number of comments to return, up to 50. Defaults to 20."
          }
        },
        "required": ["patternId"]
      },
      "endpoint": "/api/comments/:patternId",
      "method": "GET"
    },
    {
      "name": "get_pattern_finishes",
      "description": "Read the community finished-project photos for a pattern (makers who completed it and shared a photo), newest first, cursor paginated.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "patternId": {
            "type": "string",
            "description": "The id of the pattern whose community finishes to read."
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor returned as nextCursor from a previous call."
          },
          "limit": {
            "type": "number",
            "description": "Number of finishes to return, up to 50. Defaults to 20."
          }
        },
        "required": ["patternId"]
      },
      "endpoint": "/api/finishes/:patternId",
      "method": "GET"
    }
  ],
  "inPageTools": {
    "documentation": "https://www.knytstudio.com/chatgpt",
    "description": "WebMCP tools the pages register in the browser (document.modelContext.registerTool), for an agent browsing KnytStudio such as ChatGPT's built-in browser. They run in the page as the signed-in user; every pattern edit is one Undo step and is saved like a manual edit.",
    "pages": [
      {
        "page": "https://www.knytstudio.com/",
        "scope": "Every marketing page",
        "tools": ["search_patterns", "start_pattern", "open_my_patterns"]
      },
      {
        "page": "https://www.knytstudio.com/dashboard",
        "scope": "The user's dashboard",
        "tools": ["list_my_patterns", "open_pattern", "start_new_pattern"]
      },
      {
        "page": "https://www.knytstudio.com/project/{id}",
        "scope": "The pattern editor (cross stitch, needlepoint, diamond painting, fuse beads, knitting and crochet charts)",
        "tools": ["get_pattern", "read_cells", "find_colors", "paint_cells", "replace_color", "merge_colors", "add_colors", "remove_unused_colors", "resize_pattern", "set_title", "set_view_mode", "undo", "redo", "open_pdf_export"]
      }
    ]
  }
}
