conf_search
Search Atlassian Confluence content using CQL or basic text queries with filters for title, space, labels, and content type. Includes pagination and returns Markdown-formatted results with snippets and metadata.
Instructions
Searches Confluence content. Supports multiple filter options: cql
(for providing a complete custom Confluence Query Language string), title
(text in title), spaceKey
, labels
, and contentType
(page/blogpost). A general query
parameter performs a basic text search (equivalent to CQL: text ~ "your query").
IMPORTANT for
cql
users: Ensure your CQL syntax is correct, especially quoting terms in text searches (e.g.,text ~ "search phrase"
). Invalid CQL will result in an error. Refer to official Confluence CQL documentation.Filters are generally combined with AND logic.
Supports pagination (
limit
,cursor
).The executed CQL and pagination information (including next cursor value) are included directly in the returned text content.
Returns Markdown formatted results with snippets and metadata.
Requires Confluence credentials.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
contentType | No | Optional: Filter results by content type. Choose either "page" or "blogpost". If `cql` is also provided, this will be ANDed with it (e.g., `type = "YOUR_TYPE" AND (YOUR_CQL)`). Otherwise, it will be used to build the CQL as `type = "YOUR_TYPE"`. | |
cql | No | Optional: Full Confluence Query Language (CQL) string for advanced filtering. Example: `space = "DOCS" AND label = "release-notes" AND (title ~ "Q1" OR text ~ "Quarter 1")`. If provided, this forms the base of the search and other filter parameters (title, spaceKey, etc.) will be ANDed with it. Ensure terms in `text ~` clauses are double-quoted if they contain spaces or are not simple words (e.g., `text ~ "my search phrase"`). Refer to Confluence CQL syntax guide for details. | |
cursor | No | Pagination cursor for retrieving the next set of results. Obtain this opaque string from the metadata.pagination.nextCursor of a previous response when more results are available. Confluence uses cursor-based pagination rather than offset-based pagination. | |
labels | No | Optional: Filter results to content tagged with ALL of these labels (array). Example: ["project-x", "roadmap"]. If `cql` is also provided, this will be ANDed with it (e.g., `label = "label1" AND label = "label2" AND (YOUR_CQL)`). Otherwise, it will be used to build the CQL with multiple label conditions. | |
limit | No | Maximum number of search results to return (1-100). Controls the response size. Defaults to 25 if omitted. The Confluence search API caps results at 100 items per request. | |
query | No | Optional: Simple text search query. This will search for the given text within the content body, title, and comments. Translates to CQL: `text ~ "YOUR_QUERY"`. If both `query` and `cql` are provided, they will be combined with AND (e.g., `text ~ "YOUR_QUERY" AND (YOUR_CQL)`). For sophisticated text searches, prefer using the `cql` parameter directly. | |
spaceKey | No | Optional: Filter results to content within a specific space key. Example: "DEV", "HR". If `cql` is also provided, this will be ANDed with it (e.g., `space = "YOUR_SPACE" AND (YOUR_CQL)`). Otherwise, it will be used to build the CQL as `space = "YOUR_SPACE"`. | |
title | No | Optional: Filter results to content where the title contains this text (case-insensitive search). Example: "Meeting Notes". If `cql` is also provided, this will be ANDed with it (e.g., `title ~ "YOUR_TITLE" AND (YOUR_CQL)`). Otherwise, it will be used to build the CQL as `title ~ "YOUR_TITLE"`. |