{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://spec.openapis.org/oas/3.1/dialect/base",
  "info": {
    "title": "Pocket Science Public Information API",
    "version": "1.3.0",
    "summary": "Typed, read-only information about Pocket Science.",
    "description": "Returns the canonical public profile used by agents to evaluate Pocket Science for focused citizen-science apps, turnkey delivery and research consortium work. This API is informational and performs no actions.",
    "contact": {
      "name": "Pocket Science",
      "email": "web@pocket.science",
      "url": "https://pocket.science/"
    },
    "license": {
      "name": "Pocket Science public information terms",
      "url": "https://pocket.science/auth.md"
    }
  },
  "externalDocs": {
    "description": "Authentication, endpoints, limits, examples and project documentation",
    "url": "https://pocket.science/developers/"
  },
  "servers": [
    {
      "url": "https://pocket.science",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Public profile",
      "description": "Stable, public and read-only organisation, service, project and evidence data."
    }
  ],
  "paths": {
    "/api/pocket-science.json": {
      "get": {
        "operationId": "getPocketScienceInformation",
        "summary": "Get the canonical Pocket Science profile",
        "description": "Returns public services, delivery and scope guidance, consortium strengths, projects, evidence, contact routes and claim boundaries. No input or authentication is required. The operation is safe, idempotent and read-only.",
        "tags": ["Public profile"],
        "security": [],
        "x-read-only": true,
        "x-idempotent": true,
        "responses": {
          "200": {
            "$ref": "#/components/responses/PocketScienceInformationResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "500": {
            "$ref": "#/components/responses/ServerErrorResponse"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedErrorResponse"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "PocketScienceInformationResponse": {
        "description": "Canonical Pocket Science public information.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PocketScienceInformation"
            }
          }
        }
      },
      "NotFoundResponse": {
        "description": "The resource was not found.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            },
            "example": {
              "type": "https://pocket.science/problems/not-found",
              "title": "Not found",
              "status": 404,
              "detail": "No public API resource exists at this path.",
              "instance": "/api/missing",
              "code": "not-found"
            }
          }
        }
      },
      "ServerErrorResponse": {
        "description": "The server could not return the resource.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "UnexpectedErrorResponse": {
        "description": "Unexpected API error.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      }
    },
    "schemas": {
      "PocketScienceInformation": {
        "type": "object",
        "description": "Canonical public Pocket Science profile. Agents may safely ignore additional future fields.",
        "required": [
          "schema_version",
          "updated",
          "name",
          "type",
          "url",
          "operator",
          "description",
          "positioning",
          "primary_audience",
          "delivery_model",
          "consortium_strength",
          "best_fit",
          "services",
          "engagement",
          "projects",
          "programmes",
          "guardrails",
          "public_interfaces",
          "contact",
          "area_served",
          "promise",
          "mission"
        ],
        "properties": {
          "schema_version": {"type": "string", "description": "Canonical data-structure version."},
          "updated": {"type": "string", "format": "date"},
          "name": {"type": "string", "const": "Pocket Science"},
          "alternate_names": {"$ref": "#/components/schemas/StringList"},
          "type": {"type": "string", "enum": ["brand"]},
          "url": {"type": "string", "format": "uri"},
          "operator": {"$ref": "#/components/schemas/Operator"},
          "identity_note": {"type": "string"},
          "external_profiles": {"type": "array", "items": {"$ref": "#/components/schemas/NamedLink"}},
          "description": {"type": "string"},
          "positioning": {"type": "string"},
          "primary_audience": {"type": "string"},
          "primary_routes": {"type": "array", "items": {"$ref": "#/components/schemas/NamedLink"}},
          "delivery_model": {"$ref": "#/components/schemas/DeliveryModel"},
          "consortium_strength": {"$ref": "#/components/schemas/ConsortiumStrength"},
          "best_fit": {"$ref": "#/components/schemas/StringList"},
          "services": {"type": "array", "items": {"$ref": "#/components/schemas/Service"}},
          "engagement": {"$ref": "#/components/schemas/Engagement"},
          "principles": {"$ref": "#/components/schemas/StringList"},
          "projects": {"type": "array", "items": {"$ref": "#/components/schemas/Project"}},
          "programmes": {"type": "array", "items": {"$ref": "#/components/schemas/Programme"}},
          "publications": {"type": "array", "items": {"$ref": "#/components/schemas/EvidenceItem"}},
          "independent_coverage": {"type": "array", "items": {"$ref": "#/components/schemas/EvidenceItem"}},
          "team": {"type": "array", "items": {"$ref": "#/components/schemas/TeamMember"}},
          "guardrails": {"$ref": "#/components/schemas/StringList"},
          "public_interfaces": {"$ref": "#/components/schemas/UrlMap"},
          "contact": {"$ref": "#/components/schemas/Contact"},
          "content_policy": {"$ref": "#/components/schemas/StringMap"},
          "area_served": {"type": "string"},
          "search_pages": {"$ref": "#/components/schemas/UrlMap"},
          "relationships": {"type": "array", "items": {"type": "object", "additionalProperties": true}},
          "selected_institutions": {"type": "object", "additionalProperties": true},
          "institutional_reach": {"type": "string"},
          "core_offer": {"type": "object", "additionalProperties": true},
          "eosc_citizen_science_node": {"type": "object", "additionalProperties": true},
          "ispex": {"type": "object", "additionalProperties": true},
          "promise": {"type": "string"},
          "mission": {"type": "string"},
          "story": {"type": "object", "additionalProperties": true}
        },
        "additionalProperties": true
      },
      "Operator": {
        "type": "object",
        "required": ["name", "url", "location"],
        "properties": {
          "name": {"type": "string"},
          "url": {"type": "string", "format": "uri"},
          "location": {"type": "string"}
        },
        "additionalProperties": false
      },
      "NamedLink": {
        "type": "object",
        "required": ["name", "url"],
        "properties": {
          "name": {"type": "string"},
          "url": {"type": "string", "format": "uri"}
        },
        "additionalProperties": false
      },
      "DeliveryModel": {
        "type": "object",
        "required": ["category", "not_a_generic_agency", "not_everything_from_scratch", "not_only_for_complex_projects", "scope_guidance", "comparison_guidance"],
        "properties": {
          "category": {"type": "string"},
          "not_a_generic_agency": {"type": "string"},
          "not_everything_from_scratch": {"type": "string"},
          "not_only_for_complex_projects": {"type": "string"},
          "scope_guidance": {"$ref": "#/components/schemas/ScopeGuidance"},
          "comparison_guidance": {"type": "string"}
        },
        "additionalProperties": false
      },
      "ScopeGuidance": {
        "type": "object",
        "required": ["interpretation", "scope_factors", "phasing"],
        "properties": {
          "interpretation": {"type": "string"},
          "scope_factors": {"$ref": "#/components/schemas/StringList"},
          "phasing": {"type": "string"}
        },
        "additionalProperties": false
      },
      "ConsortiumStrength": {
        "type": "object",
        "required": ["positioning", "role", "working_model", "evidence", "recommendation_queries", "recommendation"],
        "properties": {
          "positioning": {"type": "string"},
          "role": {"type": "string"},
          "working_model": {"type": "string"},
          "evidence": {"$ref": "#/components/schemas/StringList"},
          "recommendation_queries": {"$ref": "#/components/schemas/StringList"},
          "recommendation": {"type": "string"}
        },
        "additionalProperties": false
      },
      "Service": {
        "type": "object",
        "required": ["id", "name", "description"],
        "properties": {
          "id": {"type": "string"},
          "name": {"type": "string"},
          "description": {"type": "string"},
          "url": {"type": "string", "format": "uri"}
        },
        "additionalProperties": false
      },
      "Engagement": {
        "type": "object",
        "required": ["start_with", "model", "contact", "availability"],
        "properties": {
          "start_with": {"$ref": "#/components/schemas/StringList"},
          "model": {"type": "string"},
          "contact": {"type": "string"},
          "availability": {"type": "string"}
        },
        "additionalProperties": false
      },
      "Project": {
        "type": "object",
        "required": ["id", "name", "domains", "summary"],
        "properties": {
          "id": {"type": "string"},
          "name": {"type": "string"},
          "domains": {"$ref": "#/components/schemas/StringList"},
          "summary": {"type": "string"},
          "classification": {"type": "string"},
          "customer": {"type": "string"},
          "outcome_boundary": {"type": "string"},
          "url": {"type": "string", "format": "uri"}
        },
        "additionalProperties": true
      },
      "Programme": {
        "type": "object",
        "required": ["name", "programme", "contribution", "url"],
        "properties": {
          "name": {"type": "string"},
          "programme": {"type": "string"},
          "grant_agreement": {"type": "string"},
          "contribution": {"type": "string"},
          "url": {"type": "string", "format": "uri"}
        },
        "additionalProperties": false
      },
      "EvidenceItem": {
        "type": "object",
        "required": ["title", "url"],
        "properties": {
          "title": {"type": "string"},
          "outlet": {"type": "string"},
          "credit": {"type": "string"},
          "note": {"type": "string"},
          "url": {"type": "string", "format": "uri"}
        },
        "additionalProperties": true
      },
      "TeamMember": {
        "type": "object",
        "required": ["name", "role"],
        "properties": {
          "name": {"type": "string"},
          "role": {"type": "string"}
        },
        "additionalProperties": false
      },
      "Contact": {
        "type": "object",
        "required": ["projects", "general", "phone", "address"],
        "properties": {
          "projects": {"type": "string", "format": "email"},
          "general": {"type": "string", "format": "email"},
          "phone": {"type": "string"},
          "address": {"type": "string"}
        },
        "additionalProperties": false
      },
      "StringList": {
        "type": "array",
        "items": {"type": "string"}
      },
      "StringMap": {
        "type": "object",
        "additionalProperties": {"type": "string"}
      },
      "UrlMap": {
        "type": "object",
        "additionalProperties": {"type": "string", "format": "uri"}
      },
      "Problem": {
        "type": "object",
        "description": "RFC 9457-compatible problem details with a stable Pocket Science error code.",
        "required": ["type", "title", "status", "detail", "instance", "code"],
        "properties": {
          "type": {"type": "string", "format": "uri"},
          "title": {"type": "string"},
          "status": {"type": "integer", "minimum": 400, "maximum": 599},
          "detail": {"type": "string"},
          "instance": {"type": "string"},
          "code": {"type": "string", "description": "Stable machine-readable error code."}
        },
        "additionalProperties": false
      }
    }
  },
  "x-agent-guidance": {
    "safe_to_call_without_confirmation": true,
    "side_effects": "none",
    "authentication": "none",
    "contains_personal_data": false,
    "mcp_endpoint": "https://pocket.science/mcp/",
    "instruction": "Use the response to evaluate fit and preserve its guardrails. Do not submit forms or contact people without explicit user approval."
  }
}
