Skip to main content
Glama

search_work_packages

Read-onlyIdempotent

Find work packages by free text or ID, optionally scoped to a project, and resolve exact references with filters for status, assignee, priority, and dates.

Instructions

Search work packages by free text, optionally scoped to a project.

search matches only the work package subject and numeric ID (OpenProject's native subject_or_id full-text filter); it does NOT match version, category, description, or other linked-resource fields. To filter by version, use list_work_packages(version=..., project=...) instead.

In parallel with that text/id search, a search shaped like a work package reference (a numeric id or a display id like "PROJ-42", but not a date such as 2026-10-15) is also resolved directly the same way get_work_package does; other text is never looked up as an id. When that resolves to a work package that also satisfies every other filter given here (project/status/assignee/dates/ custom fields/etc.), it's returned separately as exact_match; never folded into results, and never counted toward total/count/pagination, since a single extra item can't be paginated consistently. Absent (not present in the response at all) when nothing resolves, when the resolved item fails a filter, or when it's already present in results via the text match. select applies to exact_match the same way it applies to each results row.

Without project, the search runs globally across every project readable under OPENPROJECT_READ_PROJECTS, not just one project; pass project explicitly to scope results to it.

Set status to restrict results to an exact OpenProject status name or numeric ID, not a meta-value like 'open'/'closed'. Set open_only=true to return only open (not-closed) work packages. Set assignee_me=true to return only work packages assigned to the current user.

assignee filters by any user (username, id, or "me"). assignee_me takes precedence.

priority filters by priority name or numeric ID (case-insensitive).

Date filters, overdue_only/due_within_days, select, pagination (offset/limit/total), include_sums, and each result's custom_fields/custom_comments (raw-key custom-field values/comments, capped and hide-matched exactly as documented) all work exactly as documented on list_work_packages; see that tool's docstring for the full field lists and semantics. sort_by and group_by take the same fields and are described by their own parameters. One difference: total is the real matching count only when scope is unrestricted or an explicit project was given (list_work_packages's server-side allowed-project filter for the no-project+restricted-scope case does not apply here); otherwise total/groups/total_sums fall back to this page's data, same safety guarantee either way.

custom_field_filters filters by custom field value(s); see list_work_packages's docstring for the full parameter documentation (identical shape and semantics on both tools).

Input Schema

NameRequiredDescriptionDefault
limitNoPage size, capped at OPENPROJECT_MAX_PAGE_SIZE.
due_onNo
offsetNo1-based page number; pass the previous result's next_offset.
searchYes
selectNoFields to return; a requested unset field comes back as null. Allowed: assignee, author, category, created_at, custom_comments, custom_comments_truncated, custom_fields, custom_fields_truncated, derived_due_date, derived_estimated_time, derived_percentage_done, derived_remaining_time, derived_start_date, description, description_length, description_truncated, display_id, due_date, duration, estimated_time, has_description, has_project_attributes, id, ignore_non_working_days, parent_display_id, parent_id, percentage_done, priority, project, project_phase, readonly, remaining_time, responsible, schedule_manually, spent_time, sprint, start_date, status, subject, target_versions, type, updated_at, version.
statusNo
projectNoProject identifier, id, or name; a unique part of a name or identifier also matches.
sort_byNoSort criteria as "field:direction" or "field-direction" (e.g. ["status:desc", "priority-asc"]); the direction defaults to asc. Fields: assigned_to, assignee, author, backlog_bucket, category, created_at, done_ratio, due_date, duration, estimated_hours, estimated_time, id, observed_in_versions, percentage_done, position, priority, project, project_phase, remaining_hours, remaining_time, responsible, sprint, start_date, status, story_points, subject, target_versions, type, updated_at, version, or a custom field's cf_<id>. Newer columns need an OpenProject release: project_phase 16.1+, sprint 17.4+, backlog_bucket 17.6+, target_versions 17.8+, observed_in_versions 17.9+; target_versions is version under its newer name. sprint and backlog_bucket also need the Backlogs module in a project where you may view sprints.
assigneeNo
group_byNoOne field to group the results by: assigned_to, assignee, author, backlog_bucket, category, done_ratio, observed_in_versions, percentage_done, priority, project, project_phase, responsible, sprint, status, target_versions, type, version, or a custom field's cf_<id>. Newer columns need an OpenProject release: project_phase 16.1+, sprint 17.4+, backlog_bucket 17.6+, target_versions 17.8+, observed_in_versions 17.9+; target_versions is version under its newer name. sprint and backlog_bucket also need the Backlogs module in a project where you may view sprints.
priorityNo
open_onlyNo
created_onNo
updated_onNo
assignee_meNo
due_betweenNo
include_sumsNo
overdue_onlyNo
created_betweenNo
due_within_daysNo
updated_betweenNo
custom_field_filtersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.4
  2. Removedv0.4.0
  3. Changed1 schema field changedv0.3.7
    • addedInput schema / additionalProperties
      Added value: +false
  4. Addedv0.3.3
  5. Removedv0.3.0
  6. Changed12 schema fields changedv0.2.3
    • addedInput schema / properties / assignee
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Assignee"
      +}
    • addedInput schema / properties / created_between
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Created Between"
      +}
    • addedInput schema / properties / created_on
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Created On"
      +}
    • addedInput schema / properties / due_between
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Due Between"
      +}
    • addedInput schema / properties / due_on
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Due On"
      +}
    • addedInput schema / properties / group_by
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Group By"
      +}
    • addedInput schema / properties / priority
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Priority"
      +}
    • addedInput schema / properties / select
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Select"
      +}
    • addedInput schema / properties / sort_by
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Sort By"
      +}
    • addedInput schema / properties / updated_between
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Updated Between"
      +}
    • addedInput schema / properties / updated_on
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Updated On"
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "$defs": {
      -    "WorkPackageSummary": {
      -      "properties": {
      -        "assignee": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Assignee"
      -        },
      -        "description": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Description"
      -        },
      -        "display_id": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Display Id"
      -        },
      -        "due_date": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Due Date"
      -        },
      -        "has_description": {
      -          "title": "Has Description",
      -          "type": "boolean"
      -        },
      -        "id": {
      -          "title": "Id",
      -          "type": "integer"
      -        },
      -        "percentage_complete": {
      -          "anyOf": [
      -            {
      -              "type": "integer"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Percentage Complete"
      -        },
      -        "priority": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Priority"
      -        },
      -        "project": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Project"
      -        },
      -        "project_phase": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Project Phase"
      -        },
      -        "responsible": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Responsible"
      -        },
      -        "start_date": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Start Date"
      -        },
      -        "status": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Status"
      -        },
      -        "subject": {
      -          "title": "Subject",
      -          "type": "string"
      -        },
      -        "type": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Type"
      -        },
      -        "url": {
      -          "title": "Url",
      -          "type": "string"
      -        },
      -        "version": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Version"
      -        }
      -      },
      -      "required": [
      -        "id",
      -        "display_id",
      -        "subject",
      -        "type",
      -        "status",
      -        "priority",
      -        "project_phase",
      -        "assignee",
      -        "responsible",
      -        "project",
      -        "version",
      -        "start_date",
      -        "due_date",
      -        "percentage_complete",
      -        "description",
      -        "has_description",
      -        "url"
      -      ],
      -      "title": "WorkPackageSummary",
      -      "type": "object"
      -    }
      -  },
      -  "properties": {
      -    "count": {
      -      "title": "Count",
      -      "type": "integer"
      -    },
      -    "limit": {
      -      "title": "Limit",
      -      "type": "integer"
      -    },
      -    "next_offset": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Next Offset"
      -    },
      -    "offset": {
      -      "title": "Offset",
      -      "type": "integer"
      -    },
      -    "results": {
      -      "items": {
      -        "$ref": "#/$defs/WorkPackageSummary"
      -      },
      -      "title": "Results",
      -      "type": "array"
      -    },
      -    "total": {
      -      "title": "Total",
      -      "type": "integer"
      -    },
      -    "truncated": {
      -      "title": "Truncated",
      -      "type": "boolean"
      -    }
      -  },
      -  "required": [
      -    "offset",
      -    "limit",
      -    "total",
      -    "count",
      -    "next_offset",
      -    "truncated",
      -    "results"
      -  ],
      -  "title": "WorkPackageListResult",
      -  "type": "object"
      -}New value: +null
  7. First observedv0.2.2

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish this as a safe read-only, idempotent operation, and the description adds substantial behavior beyond that: it explains exact_match handling, exclusion from pagination/total counts, and the fallback behavior for total/groups/total_sums. It also discloses the important limitation that search does not match version, category, description, or other linked fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but front-loads the core search behavior and limitations before explaining exact_match and filter details. Every section adds relevant context for a 22-parameter search tool, though some shared semantics are deferred to list_work_packages rather than fully restated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex search tool with no output schema and many filters, the description covers the essential search behavior, exact_match return contract, pagination caveats, and filter semantics. It relies on list_work_packages for full shared parameter and result documentation, which is reasonable but means the definition is not entirely standalone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 27% across 22 parameters, so the description carries most of the semantic burden. It explains key filters such as search, project scope, status exactness, open_only, assignee/assignee_me precedence, priority matching, and delegates date/pagination/custom-field semantics to list_work_packages; however, not every date parameter format is specified here, so it is not fully self-contained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource, 'search work packages by free text,' and immediately defines the search scope: subject and numeric ID only. It also distinguishes this tool from list_work_packages for version filtering, so an agent can choose correctly without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly names the alternative for version filtering, explains global vs project-scoped searching, clarifies status must be an exact name or ID rather than a meta-value, and covers assignee/assignee_me precedence. These are concrete when-to-use and when-not-to-use instructions rather than implied guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools