{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/teamyou-com/json-schema/teamyou-com-search-documents-request-schema.json",
  "title": "SearchDocumentsRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/teamyou-com-openapi.json#/components/schemas/SearchDocumentsRequest",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "precision": {
      "type": "string",
      "enum": [
        "high",
        "medium",
        "low"
      ],
      "default": "medium"
    },
    "pathPrefix": {
      "type": "string",
      "description": "Scope the search to a folder, e.g. \"memory/\". Canonicalized exactly the way a written path is and matched case-insensitively, so the prefix you send does not have to be the stored form. A trailing \"/\" is optional and \"memory\" cannot match a sibling document named \"memory-archive.md\". Omit to search all of Agent Drive.",
      "x-mcp-description": "Search one folder, e.g. \"memory/\": canonicalized like a written path and matched case-insensitively. The trailing \"/\" is optional, and \"memory\" never matches \"memory-archive.md\". Omit to search all of Agent Drive."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "description": "Maximum documents to return. Defaults to the precision level’s own cap (high 15, medium 20, low 25); a larger value also widens how many candidates are retrieved."
    },
    "scope": {
      "type": "string",
      "enum": [
        "mine",
        "shared",
        "all"
      ],
      "default": "mine",
      "description": "Which documents to search. mine (default) = only your own, exactly as this endpoint behaved before scope existed. shared = ONLY documents other people have granted to you — use this to answer \"what did someone share with me about X\" without wading through your own Agent Drive documents. all = both, fused into one ranked list. Shared-in hits come back with source \"drive-shared\" and a sharedBy object. Access is checked on every request, so a revoked document is gone from the very next search.",
      "x-mcp-description": "mine (default) = your own. shared = only documents others granted to you (for \"what did someone share with me about X\"). all = both in one ranked list; shared hits carry source \"drive-shared\" and sharedBy. Revoked access drops out at once."
    },
    "where": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Repeat (query) or list (body) to AND up to 10 clauses. Split on the FIRST colon, so a value may contain colons: key is letters/digits/_/- up to 64 chars, value up to 200. A clause matches a field equal to the value OR an array containing it, so tags:research finds \"tags: [research, ops]\"; a value that is exactly a number or true/false is also tried typed, so priority:3 finds an unquoted 3. No ranges, no OR, no nested paths. Filtering only NARROWS what the scope returns. Not supported with scope=accessed.",
      "x-mcp-description": "key:value clauses, ANDed, up to 10; split on the FIRST colon. Matches a field equal to the value or an array containing it (tags:research); numbers and true/false also match typed. No ranges, OR or nested paths. Only narrows the scope. Not with scope=accessed."
    },
    "relevanceFilter": {
      "type": "boolean",
      "default": true,
      "description": "false: return every match."
    }
  },
  "required": [
    "query"
  ]
}