{
  "service": "readwise",
  "displayName": "Readwise",
  "categories": [
    "Productivity"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "Access Token",
      "placeholder": "READWISE_ACCESS_TOKEN",
      "description": "Readwise access token used with the Authorization: Token <token> header. Copy it from the Readwise access token page: https://readwise.io/access_token."
    }
  ],
  "homepageUrl": "https://readwise.io",
  "actions": [
    {
      "id": "readwise.create_highlights",
      "service": "readwise",
      "name": "create_highlights",
      "description": "Create one or more highlights in Readwise.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "highlights": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The highlighted text to save in Readwise."
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The title of the source document or book."
                },
                "author": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The author of the source document or book."
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "books",
                    "articles",
                    "tweets",
                    "podcasts",
                    "supplemental"
                  ],
                  "description": "The Readwise highlight category such as books, articles, tweets, podcasts, or supplemental."
                },
                "source_type": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The source type associated with the highlight, such as kindle, pocket, instapaper, or api."
                },
                "note": {
                  "type": "string",
                  "description": "An optional note attached to the highlight."
                },
                "location": {
                  "type": "integer",
                  "minimum": 1,
                  "description": "The highlight location in the source when available."
                },
                "location_type": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The Readwise location type, such as page or order."
                },
                "highlighted_at": {
                  "type": "string",
                  "minLength": 1,
                  "description": "An ISO 8601 datetime string accepted by Readwise."
                },
                "url": {
                  "type": "string",
                  "description": "The URL of the highlighted source when available.",
                  "format": "uri"
                }
              },
              "additionalProperties": false,
              "required": [
                "text",
                "title"
              ],
              "description": "A highlight object accepted by the Readwise create highlights API."
            },
            "description": "The highlights to create.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "description": "The input payload for creating Readwise highlights."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "books": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The Readwise book identifier."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The source title."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "author": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The source author."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Readwise source category."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The source integration or origin returned by Readwise."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "numHighlights": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The number of highlights in the source."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updatedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The datetime when the source was last updated."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "highlights": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "description": "The Readwise highlight identifier."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "text": {
                        "type": "string",
                        "description": "The highlighted text."
                      },
                      "title": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The source title when Readwise returns it."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "author": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The source author when Readwise returns it."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "note": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The note attached to the highlight when present."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "url": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The source URL when present."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "highlightedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The datetime when the text was highlighted."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "updatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The datetime when the highlight was last updated."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "raw": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true,
                        "description": "The raw highlight object returned by Readwise."
                      }
                    },
                    "additionalProperties": false,
                    "description": "A normalized Readwise highlight."
                  },
                  "description": "Highlights included with this source."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw source object returned by Readwise."
                }
              },
              "additionalProperties": false,
              "description": "A normalized Readwise book or source."
            },
            "description": "The books, articles, or podcasts created or updated by Readwise."
          },
          "raw": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "One raw source object returned by Readwise."
            },
            "description": "The raw list of books, articles, or podcasts returned by Readwise."
          }
        },
        "additionalProperties": false,
        "description": "The response returned after creating Readwise highlights."
      }
    },
    {
      "id": "readwise.export_highlights",
      "service": "readwise",
      "name": "export_highlights",
      "description": "Export Readwise books and highlights updated after an optional date cursor.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "updatedAfter": {
            "type": "string",
            "minLength": 1,
            "description": "An ISO 8601 datetime string accepted by Readwise."
          },
          "pageCursor": {
            "type": "string",
            "minLength": 1,
            "description": "The pagination cursor returned by a previous export response."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for exporting Readwise highlights."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "count": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The total number of matching source records when provided."
              },
              {
                "type": "null"
              }
            ]
          },
          "nextPageCursor": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor to pass as pageCursor on the next request, or null when there are no more pages."
              },
              {
                "type": "null"
              }
            ]
          },
          "books": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The Readwise book identifier."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The source title."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "author": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The source author."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Readwise source category."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The source integration or origin returned by Readwise."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "numHighlights": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The number of highlights in the source."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updatedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The datetime when the source was last updated."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "highlights": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "description": "The Readwise highlight identifier."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "text": {
                        "type": "string",
                        "description": "The highlighted text."
                      },
                      "title": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The source title when Readwise returns it."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "author": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The source author when Readwise returns it."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "note": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The note attached to the highlight when present."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "url": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The source URL when present."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "highlightedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The datetime when the text was highlighted."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "updatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The datetime when the highlight was last updated."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "raw": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true,
                        "description": "The raw highlight object returned by Readwise."
                      }
                    },
                    "additionalProperties": false,
                    "description": "A normalized Readwise highlight."
                  },
                  "description": "Highlights included with this source."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw source object returned by Readwise."
                }
              },
              "additionalProperties": false,
              "description": "A normalized Readwise book or source."
            },
            "description": "The exported books or sources."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw export response returned by Readwise."
          }
        },
        "additionalProperties": false,
        "description": "The response returned when exporting Readwise highlights."
      }
    },
    {
      "id": "readwise.list_books",
      "service": "readwise",
      "name": "list_books",
      "description": "List Readwise books or sources with optional category and update filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "The page number to return."
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of books to return per page."
          },
          "category": {
            "type": "string",
            "enum": [
              "books",
              "articles",
              "tweets",
              "podcasts",
              "supplemental"
            ],
            "description": "The Readwise highlight category such as books, articles, tweets, podcasts, or supplemental."
          },
          "updatedAfter": {
            "type": "string",
            "minLength": 1,
            "description": "An ISO 8601 datetime string accepted by Readwise."
          },
          "updatedBefore": {
            "type": "string",
            "minLength": 1,
            "description": "An ISO 8601 datetime string accepted by Readwise."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Readwise books."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "count": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The total number of matching books when provided."
              },
              {
                "type": "null"
              }
            ]
          },
          "next": {
            "anyOf": [
              {
                "type": "string",
                "description": "The URL for the next page, or null when there is no next page."
              },
              {
                "type": "null"
              }
            ]
          },
          "previous": {
            "anyOf": [
              {
                "type": "string",
                "description": "The URL for the previous page, or null when there is no previous page."
              },
              {
                "type": "null"
              }
            ]
          },
          "books": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The Readwise book identifier."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The source title."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "author": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The source author."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Readwise source category."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The source integration or origin returned by Readwise."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "numHighlights": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The number of highlights in the source."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updatedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The datetime when the source was last updated."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "highlights": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "description": "The Readwise highlight identifier."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "text": {
                        "type": "string",
                        "description": "The highlighted text."
                      },
                      "title": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The source title when Readwise returns it."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "author": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The source author when Readwise returns it."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "note": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The note attached to the highlight when present."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "url": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The source URL when present."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "highlightedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The datetime when the text was highlighted."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "updatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The datetime when the highlight was last updated."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "raw": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true,
                        "description": "The raw highlight object returned by Readwise."
                      }
                    },
                    "additionalProperties": false,
                    "description": "A normalized Readwise highlight."
                  },
                  "description": "Highlights included with this source."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw source object returned by Readwise."
                }
              },
              "additionalProperties": false,
              "description": "A normalized Readwise book or source."
            },
            "description": "The books returned by Readwise."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw books response returned by Readwise."
          }
        },
        "additionalProperties": false,
        "description": "The response returned when listing Readwise books."
      }
    },
    {
      "id": "readwise.list_documents",
      "service": "readwise",
      "name": "list_documents",
      "description": "List Readwise Reader documents with optional filters and pagination.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "pageCursor": {
            "type": "string",
            "minLength": 1,
            "description": "The pagination cursor returned by a previous list response."
          },
          "updatedAfter": {
            "type": "string",
            "minLength": 1,
            "description": "An ISO 8601 datetime string accepted by Readwise."
          },
          "location": {
            "type": "string",
            "enum": [
              "new",
              "later",
              "shortlist",
              "archive",
              "feed"
            ],
            "description": "The Reader location filter such as new, later, shortlist, archive, or feed."
          },
          "category": {
            "type": "string",
            "minLength": 1,
            "description": "The Reader category filter such as article, email, rss, or pdf."
          },
          "tag": {
            "type": "string",
            "minLength": 1,
            "description": "Only return documents with this tag."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Readwise Reader documents."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "count": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The total number of matching documents when provided."
              },
              {
                "type": "null"
              }
            ]
          },
          "nextPageCursor": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor to pass as pageCursor on the next request, or null when there are no more pages."
              },
              {
                "type": "null"
              }
            ]
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Readwise Reader document identifier."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The document URL."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sourceUrl": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The original source URL when Readwise returns it."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The document title."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "author": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The document author."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Reader category."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "location": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Reader location such as new, later, shortlist, archive, or feed."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "A Reader tag."
                  },
                  "description": "The document tags returned by Readwise."
                },
                "createdAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The datetime when the document was created."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updatedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The datetime when the document was last updated."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw document object returned by Readwise."
                }
              },
              "additionalProperties": false,
              "description": "A normalized Readwise Reader document."
            },
            "description": "The Reader documents returned by Readwise."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw list response returned by Readwise."
          }
        },
        "additionalProperties": false,
        "description": "The response returned when listing Readwise Reader documents."
      }
    },
    {
      "id": "readwise.save_document",
      "service": "readwise",
      "name": "save_document",
      "description": "Save a URL into Readwise Reader with optional metadata.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The URL to save into Readwise Reader.",
            "format": "uri"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "An optional document title."
          },
          "author": {
            "type": "string",
            "minLength": 1,
            "description": "An optional document author."
          },
          "summary": {
            "type": "string",
            "minLength": 1,
            "description": "An optional document summary."
          },
          "shouldCleanHtml": {
            "type": "boolean",
            "description": "Whether Readwise should clean the saved document HTML."
          },
          "savedUsing": {
            "type": "string",
            "minLength": 1,
            "description": "A label describing the app or workflow that saved the document."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A document tag."
            },
            "description": "Tags to attach to the saved document.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "required": [
          "url"
        ],
        "description": "The input payload for saving a Readwise Reader document."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "document": {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Readwise Reader document identifier."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "url": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The document URL."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sourceUrl": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The original source URL when Readwise returns it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "title": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The document title."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "author": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The document author."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "category": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Reader category."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "location": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Reader location such as new, later, shortlist, archive, or feed."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Reader tag."
                },
                "description": "The document tags returned by Readwise."
              },
              "createdAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The datetime when the document was created."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updatedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The datetime when the document was last updated."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw document object returned by Readwise."
              }
            },
            "additionalProperties": false,
            "description": "A normalized Readwise Reader document."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw save response returned by Readwise."
          }
        },
        "additionalProperties": false,
        "description": "The response returned after saving a Readwise Reader document."
      }
    },
    {
      "id": "readwise.update_document",
      "service": "readwise",
      "name": "update_document",
      "description": "Update the location, tags, or metadata for a Readwise Reader document.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "minLength": 1,
            "description": "The Readwise Reader document identifier."
          },
          "location": {
            "type": "string",
            "enum": [
              "new",
              "later",
              "shortlist",
              "archive",
              "feed"
            ],
            "description": "The Reader location to apply to the document."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "The updated document title."
          },
          "author": {
            "type": "string",
            "minLength": 1,
            "description": "The updated document author."
          },
          "summary": {
            "type": "string",
            "minLength": 1,
            "description": "The updated document summary."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A document tag."
            },
            "description": "The complete tag list to set on the document.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "required": [
          "documentId"
        ],
        "description": "The input payload for updating a Readwise Reader document."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "document": {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Readwise Reader document identifier."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "url": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The document URL."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sourceUrl": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The original source URL when Readwise returns it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "title": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The document title."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "author": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The document author."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "category": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Reader category."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "location": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Reader location such as new, later, shortlist, archive, or feed."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A Reader tag."
                },
                "description": "The document tags returned by Readwise."
              },
              "createdAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The datetime when the document was created."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updatedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The datetime when the document was last updated."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw document object returned by Readwise."
              }
            },
            "additionalProperties": false,
            "description": "A normalized Readwise Reader document."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw update response returned by Readwise."
          }
        },
        "additionalProperties": false,
        "description": "The response returned after updating a Readwise Reader document."
      }
    }
  ]
}
