Box · Capability

Box Platform API — Search

Box Platform API — Search. 2 operations. Lead operation: Box Query files/folders by metadata. Self-contained Naftiko capability covering one Box business surface.

Run with Naftiko BoxSearch

What You Can Do

POST
Postmetadataqueriesexecuteread — Box Query files/folders by metadata
/v1/metadata-queries/execute-read
GET
Getsearch — Box Search for content
/v1/search

MCP Tools

box-query-files-folders-metadata

Box Query files/folders by metadata

read-only
box-search-content

Box Search for content

read-only idempotent

Capability Spec

box-search.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Box Platform API — Search
  description: 'Box Platform API — Search. 2 operations. Lead operation: Box Query files/folders by metadata. Self-contained
    Naftiko capability covering one Box business surface.'
  tags:
  - Box
  - Search
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    BOX_API_KEY: BOX_API_KEY
capability:
  consumes:
  - type: http
    namespace: box-search
    baseUri: https://api.box.com/2.0
    description: Box Platform API — Search business capability. Self-contained, no shared references.
    resources:
    - name: metadata_queries-execute_read
      path: /metadata_queries/execute_read
      operations:
      - name: postmetadataqueriesexecuteread
        method: POST
        description: Box Query files/folders by metadata
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: search
      path: /search
      operations:
      - name: getsearch
        method: GET
        description: Box Search for content
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: query
          in: query
          type: string
          description: The string to search for. This query is matched against item names,
        - name: scope
          in: query
          type: string
          description: Limits the search results to either the files that the user has
        - name: file_extensions
          in: query
          type: array
          description: Limits the search results to any files that match any of the provided
        - name: created_at_range
          in: query
          type: array
          description: Limits the search results to any items created within
        - name: updated_at_range
          in: query
          type: array
          description: Limits the search results to any items updated within
        - name: size_range
          in: query
          type: array
          description: Limits the search results to any items with a size within
        - name: owner_user_ids
          in: query
          type: array
          description: Limits the search results to any items that are owned
        - name: recent_updater_user_ids
          in: query
          type: array
          description: Limits the search results to any items that have been updated
        - name: ancestor_folder_ids
          in: query
          type: array
          description: Limits the search results to items within the given
        - name: content_types
          in: query
          type: array
          description: Limits the search results to any items that match the search query
        - name: type
          in: query
          type: string
          description: Limits the search results to any items of this type. This
        - name: trash_content
          in: query
          type: string
          description: Determines if the search should look in the trash for items.
        - name: mdfilters
          in: query
          type: array
          description: Limits the search results to any items for which the metadata matches
        - name: sort
          in: query
          type: string
          description: Defines the order in which search results are returned. This API
        - name: direction
          in: query
          type: string
          description: Defines the direction in which search results are ordered. This API
        - name: limit
          in: query
          type: integer
          description: Defines the maximum number of items to return as part of a page of
        - name: include_recent_shared_links
          in: query
          type: boolean
          description: Defines whether the search results should include any items
        - name: fields
          in: query
          type: array
          description: A comma-separated list of attributes to include in the
        - name: offset
          in: query
          type: integer
          description: The offset of the item at which to begin the response.
        - name: deleted_user_ids
          in: query
          type: array
          description: Limits the search results to items that were deleted by the given
        - name: deleted_at_range
          in: query
          type: array
          description: Limits the search results to any items deleted within a given
    authentication:
      type: bearer
      token: '{{env.BOX_API_KEY}}'
  exposes:
  - type: rest
    namespace: box-search-rest
    port: 8080
    description: REST adapter for Box Platform API — Search. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/metadata-queries/execute-read
      name: metadata-queries-execute-read
      description: REST surface for metadata_queries-execute_read.
      operations:
      - method: POST
        name: postmetadataqueriesexecuteread
        description: Box Query files/folders by metadata
        call: box-search.postmetadataqueriesexecuteread
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/search
      name: search
      description: REST surface for search.
      operations:
      - method: GET
        name: getsearch
        description: Box Search for content
        call: box-search.getsearch
        with:
          query: rest.query
          scope: rest.scope
          file_extensions: rest.file_extensions
          created_at_range: rest.created_at_range
          updated_at_range: rest.updated_at_range
          size_range: rest.size_range
          owner_user_ids: rest.owner_user_ids
          recent_updater_user_ids: rest.recent_updater_user_ids
          ancestor_folder_ids: rest.ancestor_folder_ids
          content_types: rest.content_types
          type: rest.type
          trash_content: rest.trash_content
          mdfilters: rest.mdfilters
          sort: rest.sort
          direction: rest.direction
          limit: rest.limit
          include_recent_shared_links: rest.include_recent_shared_links
          fields: rest.fields
          offset: rest.offset
          deleted_user_ids: rest.deleted_user_ids
          deleted_at_range: rest.deleted_at_range
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: box-search-mcp
    port: 9090
    transport: http
    description: MCP adapter for Box Platform API — Search. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: box-query-files-folders-metadata
      description: Box Query files/folders by metadata
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: box-search.postmetadataqueriesexecuteread
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: box-search-content
      description: Box Search for content
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: box-search.getsearch
      with:
        query: tools.query
        scope: tools.scope
        file_extensions: tools.file_extensions
        created_at_range: tools.created_at_range
        updated_at_range: tools.updated_at_range
        size_range: tools.size_range
        owner_user_ids: tools.owner_user_ids
        recent_updater_user_ids: tools.recent_updater_user_ids
        ancestor_folder_ids: tools.ancestor_folder_ids
        content_types: tools.content_types
        type: tools.type
        trash_content: tools.trash_content
        mdfilters: tools.mdfilters
        sort: tools.sort
        direction: tools.direction
        limit: tools.limit
        include_recent_shared_links: tools.include_recent_shared_links
        fields: tools.fields
        offset: tools.offset
        deleted_user_ids: tools.deleted_user_ids
        deleted_at_range: tools.deleted_at_range
      outputParameters:
      - type: object
        mapping: $.