Slack · Capability

Slack Web API — Search

Slack Web API — Search. 2 operations. Lead operation: Slack Search for Files. Self-contained Naftiko capability covering one Slack business surface.

Run with Naftiko SlackSearch

What You Can Do

GET
Searchfiles — Slack Search for Files
/v1/search-files
GET
Searchmessages — Slack Search for Messages
/v1/search-messages

MCP Tools

slack-search-files

Slack Search for Files

read-only idempotent
slack-search-messages

Slack Search for Messages

read-only idempotent

Capability Spec

web-search.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Slack Web API — Search
  description: 'Slack Web API — Search. 2 operations. Lead operation: Slack Search for Files. Self-contained Naftiko capability
    covering one Slack business surface.'
  tags:
  - Slack
  - Search
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SLACK_API_KEY: SLACK_API_KEY
capability:
  consumes:
  - type: http
    namespace: web-search
    baseUri: https://slack.com/api
    description: Slack Web API — Search business capability. Self-contained, no shared references.
    resources:
    - name: search.files
      path: /search.files
      operations:
      - name: searchfiles
        method: GET
        description: Slack Search for Files
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: query
          in: query
          type: string
          required: true
        - name: count
          in: query
          type: integer
        - name: highlight
          in: query
          type: boolean
        - name: page
          in: query
          type: integer
        - name: sort
          in: query
          type: string
        - name: sort_dir
          in: query
          type: string
    - name: search.messages
      path: /search.messages
      operations:
      - name: searchmessages
        method: GET
        description: Slack Search for Messages
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: query
          in: query
          type: string
          description: Search query.
          required: true
        - name: count
          in: query
          type: integer
        - name: highlight
          in: query
          type: boolean
          description: Pass a value of true to enable query highlight markers.
        - name: page
          in: query
          type: integer
        - name: sort
          in: query
          type: string
          description: Return matches sorted by either score or timestamp.
        - name: sort_dir
          in: query
          type: string
          description: Change sort direction to ascending or descending.
    authentication:
      type: bearer
      token: '{{env.SLACK_API_KEY}}'
  exposes:
  - type: rest
    namespace: web-search-rest
    port: 8080
    description: REST adapter for Slack Web API — Search. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/search-files
      name: search-files
      description: REST surface for search.files.
      operations:
      - method: GET
        name: searchfiles
        description: Slack Search for Files
        call: web-search.searchfiles
        with:
          query: rest.query
          count: rest.count
          highlight: rest.highlight
          page: rest.page
          sort: rest.sort
          sort_dir: rest.sort_dir
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/search-messages
      name: search-messages
      description: REST surface for search.messages.
      operations:
      - method: GET
        name: searchmessages
        description: Slack Search for Messages
        call: web-search.searchmessages
        with:
          query: rest.query
          count: rest.count
          highlight: rest.highlight
          page: rest.page
          sort: rest.sort
          sort_dir: rest.sort_dir
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: web-search-mcp
    port: 9090
    transport: http
    description: MCP adapter for Slack Web API — Search. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: slack-search-files
      description: Slack Search for Files
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: web-search.searchfiles
      with:
        query: tools.query
        count: tools.count
        highlight: tools.highlight
        page: tools.page
        sort: tools.sort
        sort_dir: tools.sort_dir
      outputParameters:
      - type: object
        mapping: $.
    - name: slack-search-messages
      description: Slack Search for Messages
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: web-search.searchmessages
      with:
        query: tools.query
        count: tools.count
        highlight: tools.highlight
        page: tools.page
        sort: tools.sort
        sort_dir: tools.sort_dir
      outputParameters:
      - type: object
        mapping: $.