{
  "version": "1.1.0",
  "tools": [
    {
      "name": "search_listings",
      "description": "Search public available listings. All short keyword terms must match; use explicit city/budget/condition. Do not relax hard constraints.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "q": {
            "type": "string",
            "maxLength": 200
          },
          "city": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "Furniture",
              "Bicycles",
              "Electronics",
              "Home",
              "Services",
              "Community",
              "Other"
            ]
          },
          "min_price": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000
          },
          "max_price": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000
          },
          "kind": {
            "type": "string",
            "enum": [
              "offer",
              "wanted"
            ]
          },
          "condition": {
            "type": "string",
            "enum": [
              "new",
              "like_new",
              "good",
              "fair",
              "not_applicable"
            ]
          },
          "sort": {
            "enum": [
              "newest",
              "price_asc",
              "price_desc"
            ],
            "default": "newest"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50,
            "default": 20
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000,
            "default": 0
          },
          "demo": {
            "enum": [
              "true",
              "false"
            ],
            "default": "false"
          },
          "nearby": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "route": {
        "method": "GET",
        "path": "/api/listings",
        "query": [
          "q",
          "city",
          "category",
          "min_price",
          "max_price",
          "kind",
          "condition",
          "sort",
          "limit",
          "offset",
          "demo",
          "nearby"
        ],
        "body": []
      }
    },
    {
      "name": "get_listing",
      "description": "Read a listing by ID. Private owner records require an approved token.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 100,
            "pattern": "^(?:[a-fA-F0-9-]{36}|demo-[0-9]+)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "route": {
        "method": "GET",
        "path": "/api/listings/{id}",
        "query": [],
        "body": []
      }
    },
    {
      "name": "get_facets",
      "description": "Discover available cities and categories.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "route": {
        "method": "GET",
        "path": "/api/facets",
        "query": [],
        "body": []
      }
    },
    {
      "name": "create_draft",
      "description": "Prepare an unpublished draft. Return the private confirmation URL only to the owner; never publish it yourself without authorization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 3,
            "maxLength": 150
          },
          "description": {
            "type": "string",
            "minLength": 10,
            "maxLength": 5000
          },
          "city": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100
          },
          "category": {
            "type": "string",
            "enum": [
              "Furniture",
              "Bicycles",
              "Electronics",
              "Home",
              "Services",
              "Community",
              "Other"
            ]
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000,
            "multipleOf": 0.01
          },
          "neighborhood": {
            "type": "string",
            "maxLength": 100
          },
          "condition": {
            "type": "string",
            "enum": [
              "new",
              "like_new",
              "good",
              "fair",
              "not_applicable"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "offer",
              "wanted"
            ]
          },
          "image_ids": {
            "type": "array",
            "maxItems": 6,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "title",
          "description",
          "city",
          "category",
          "price"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "POST",
        "path": "/api/drafts",
        "query": [],
        "body": [
          "title",
          "description",
          "city",
          "category",
          "price",
          "neighborhood",
          "condition",
          "kind",
          "image_ids"
        ]
      }
    },
    {
      "name": "publish_listing",
      "description": "Publish a real offer or wanted post publicly only when the owner requested publication. Requires listings:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 3,
            "maxLength": 150
          },
          "description": {
            "type": "string",
            "minLength": 10,
            "maxLength": 5000
          },
          "city": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100
          },
          "category": {
            "type": "string",
            "enum": [
              "Furniture",
              "Bicycles",
              "Electronics",
              "Home",
              "Services",
              "Community",
              "Other"
            ]
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000,
            "multipleOf": 0.01
          },
          "neighborhood": {
            "type": "string",
            "maxLength": 100
          },
          "condition": {
            "type": "string",
            "enum": [
              "new",
              "like_new",
              "good",
              "fair",
              "not_applicable"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "offer",
              "wanted"
            ]
          },
          "image_ids": {
            "type": "array",
            "maxItems": 6,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "description": "Reuse the same key and identical content on retries for 24 hours; changing content returns 409."
          }
        },
        "required": [
          "title",
          "description",
          "city",
          "category",
          "price"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "POST",
        "path": "/api/listings",
        "query": [],
        "body": [
          "title",
          "description",
          "city",
          "category",
          "price",
          "neighborhood",
          "condition",
          "kind",
          "image_ids"
        ],
        "overrides": {
          "publish": true
        }
      }
    },
    {
      "name": "update_listing",
      "description": "Edit an owned listing using its current revision. Requires listings:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "minLength": 3,
            "maxLength": 150
          },
          "description": {
            "type": "string",
            "minLength": 10,
            "maxLength": 5000
          },
          "city": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100
          },
          "category": {
            "type": "string",
            "enum": [
              "Furniture",
              "Bicycles",
              "Electronics",
              "Home",
              "Services",
              "Community",
              "Other"
            ]
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000,
            "multipleOf": 0.01
          },
          "neighborhood": {
            "type": "string",
            "maxLength": 100
          },
          "condition": {
            "type": "string",
            "enum": [
              "new",
              "like_new",
              "good",
              "fair",
              "not_applicable"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "offer",
              "wanted"
            ]
          },
          "image_ids": {
            "type": "array",
            "maxItems": 6,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "enum": [
              "available",
              "reserved",
              "sold",
              "withdrawn"
            ]
          },
          "renew": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "revision"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "PATCH",
        "path": "/api/listings/{id}",
        "query": [],
        "body": [
          "title",
          "description",
          "city",
          "category",
          "price",
          "neighborhood",
          "condition",
          "kind",
          "image_ids",
          "revision",
          "status",
          "renew"
        ]
      }
    },
    {
      "name": "withdraw_listing",
      "description": "Withdraw an owned listing using its revision. Requires listings:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "id",
          "revision"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "DELETE",
        "path": "/api/listings/{id}",
        "query": [],
        "body": [
          "revision"
        ]
      }
    },
    {
      "name": "get_owned_listings",
      "description": "List the connected owner’s listings, including private drafts. Paginated.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "route": {
        "method": "GET",
        "path": "/api/me/listings",
        "query": [
          "offset",
          "limit"
        ],
        "body": []
      }
    },
    {
      "name": "get_identity",
      "description": "Read the connected identity and granted scopes.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "route": {
        "method": "GET",
        "path": "/api/me",
        "query": [],
        "body": []
      }
    },
    {
      "name": "request_connection",
      "description": "Ask the owner to approve minimum scopes. Returns a private poll token and a human verification URL; does not grant access.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "scopes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 3,
            "items": {
              "enum": [
                "listings:write",
                "messages:write",
                "searches:write"
              ]
            }
          }
        },
        "required": [
          "name",
          "scopes"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "POST",
        "path": "/api/agent/connect",
        "query": [],
        "body": [
          "name",
          "scopes"
        ]
      }
    },
    {
      "name": "poll_connection",
      "description": "Poll with private poll_token, at most once per 5 seconds. Approval returns a credential once. Do not expose tokens to others.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "poll_token": {
            "type": "string",
            "minLength": 10,
            "maxLength": 200
          }
        },
        "required": [
          "id",
          "poll_token"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "GET",
        "path": "/api/agent/connect/{id}",
        "query": [],
        "body": []
      }
    },
    {
      "name": "get_inbox",
      "description": "Read the owner’s private inbox. Requires messages:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "route": {
        "method": "GET",
        "path": "/api/conversations",
        "query": [
          "offset"
        ],
        "body": []
      }
    },
    {
      "name": "get_thread",
      "description": "Read a private thread with pagination. Requires messages:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000,
            "default": 0
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "route": {
        "method": "GET",
        "path": "/api/conversations/{id}",
        "query": [
          "offset"
        ],
        "body": []
      }
    },
    {
      "name": "start_inquiry",
      "description": "Contact a seller only when the owner asks. Requires messages:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 3000
          },
          "listing_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "listing_id",
          "message"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "POST",
        "path": "/api/conversations",
        "query": [],
        "body": [
          "message",
          "listing_id"
        ]
      }
    },
    {
      "name": "send_message",
      "description": "Send a private message only when authorized by the owner. Requires messages:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 3000
          }
        },
        "required": [
          "id",
          "message"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "POST",
        "path": "/api/conversations/{id}",
        "query": [],
        "body": [
          "message"
        ]
      }
    },
    {
      "name": "report_listing",
      "description": "Submit an owner-authorized listing report. Requires an approved connection.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "listing_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string",
            "minLength": 10,
            "maxLength": 2000
          }
        },
        "required": [
          "listing_id",
          "reason"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "POST",
        "path": "/api/reports",
        "query": [],
        "body": [
          "listing_id",
          "reason"
        ]
      }
    },
    {
      "name": "get_saved_searches",
      "description": "Read private saved searches; also checks due subscriptions. Requires searches:write.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "GET",
        "path": "/api/saved-searches",
        "query": [],
        "body": []
      }
    },
    {
      "name": "save_search",
      "description": "Save exact filters and enable on-site alerts, not email. Requires searches:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "filters": {
            "type": "object",
            "properties": {
              "q": {
                "type": "string",
                "maxLength": 200,
                "description": "At most 10 literal AND terms."
              },
              "city": {
                "type": "string",
                "maxLength": 100,
                "description": "Exact city or empty for all cities; no automatic area expansion."
              },
              "category": {
                "enum": [
                  "",
                  "Furniture",
                  "Bicycles",
                  "Electronics",
                  "Home",
                  "Services",
                  "Community",
                  "Other"
                ]
              },
              "condition": {
                "enum": [
                  "",
                  "new",
                  "like_new",
                  "good",
                  "fair",
                  "not_applicable"
                ]
              },
              "kind": {
                "enum": [
                  "",
                  "offer",
                  "wanted"
                ]
              },
              "min_price": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000
              },
              "max_price": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000
              },
              "nearby": {
                "type": "boolean",
                "default": false,
                "description": "Owner-approved nearby area group; requires city."
              }
            },
            "additionalProperties": false
          },
          "frequency": {
            "enum": [
              "hourly",
              "daily"
            ],
            "default": "hourly"
          }
        },
        "required": [
          "name",
          "filters"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "POST",
        "path": "/api/saved-searches",
        "query": [],
        "body": [
          "name",
          "filters",
          "frequency"
        ]
      }
    },
    {
      "name": "get_search_alerts",
      "description": "Read current exact matches, checking only when due. Requires searches:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "GET",
        "path": "/api/saved-searches/{id}",
        "query": [
          "offset"
        ],
        "body": []
      }
    },
    {
      "name": "update_saved_search",
      "description": "Rename, pause/resume or change frequency. Requires searches:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "paused": {
            "type": "boolean"
          },
          "frequency": {
            "enum": [
              "hourly",
              "daily"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "PATCH",
        "path": "/api/saved-searches/{id}",
        "query": [],
        "body": [
          "name",
          "paused",
          "frequency"
        ]
      }
    },
    {
      "name": "delete_saved_search",
      "description": "Permanently delete a saved search and its alert history only when the owner requests cancellation. Requires searches:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "DELETE",
        "path": "/api/saved-searches/{id}",
        "query": [],
        "body": []
      }
    },
    {
      "name": "acknowledge_alerts",
      "description": "Mark specified alerts as read. Requires searches:write.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 50
          }
        },
        "required": [
          "id",
          "ids"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "POST",
        "path": "/api/saved-searches/{id}/alerts",
        "query": [],
        "body": [
          "ids"
        ]
      }
    },
    {
      "name": "check_listing_quality",
      "description": "Get optional category-specific completeness hints; content is not saved or verified.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 150
          },
          "description": {
            "type": "string",
            "maxLength": 5000
          },
          "category": {
            "type": "string",
            "enum": [
              "Furniture",
              "Bicycles",
              "Electronics",
              "Home",
              "Services",
              "Community",
              "Other"
            ]
          },
          "kind": {
            "enum": [
              "offer",
              "wanted"
            ],
            "default": "offer"
          }
        },
        "required": [
          "title",
          "description",
          "category"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "route": {
        "method": "POST",
        "path": "/api/listing-quality",
        "query": [],
        "body": [
          "title",
          "description",
          "category",
          "kind"
        ]
      }
    },
    {
      "name": "upload_photo",
      "description": "Upload owner-authorized JPEG/PNG/WebP bytes as base64, up to 5 MB decoded. Requires listings:write. Never upload a server/local file path.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "data_base64": {
            "type": "string",
            "maxLength": 6990508
          },
          "mime_type": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp"
            ]
          }
        },
        "required": [
          "data_base64",
          "mime_type"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "route": {
        "method": "POST",
        "path": "/api/images",
        "upload": true
      }
    }
  ]
}
