Skip to main content
Glama

Save a query

save_query

Save a filter combination as a reusable OpenProject view, so you can re-run it later instead of rebuilding it each session.

Instructions

Save a filter set as a reusable OpenProject view.

Use it to keep a filter combination — "Overdue in Platform", "My open bugs" — instead of rebuilding it each session: the view shows up in the OpenProject UI too, and run_query reproduces it exactly. Prove filters with list_work_packages first.

Validated via POST /queries/form first, so an invalid filter name, unsupported operator, or project-scoped filter on a global view comes back as violations naming the attribute — nothing is saved. Returns the stored definition: {id, name, project, public, starred, filters (as readable sentences), group_by, sort_by, display_sums, updated_at, notes}. Keep the id — run_query takes it.

Pitfalls. If OpenProject keeps fewer filters than were sent, notes says so — read filters rather than assuming a match. Custom-field filters (customField12) are sent as plain values, since a list-typed one can't be told apart from a text one without asking the instance; a failing one means nothing was saved — save that view in the UI instead. Editing and deleting saved views isn't offered here: use the OpenProject UI.

Cross-references: list_queries lists what exists (with ids); run_query(query_id=...) runs this view; list_work_packages validates filters first; list_projects supplies project_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName the view is saved under, e.g. 'Overdue in Platform'. Not unique upstream — a repeat name creates a second view.
starNoAlso star (favorite) the view, so it appears in the sidebar. A second call after the query exists; a failure still leaves it saved (noted in 'notes') — don't re-save.
publicNotrue shares the view with everyone who can see the project; false (default) keeps it private. Sharing usually needs 'manage public queries'.
filtersYesThe filters to store, same shape as run_query's override_filters / list_work_packages' raw_filters, e.g. [{'name': 'status', 'operator': 'o', 'values': []}, {'name': 'assignee', 'operator': '=', 'values': ['12']}]. Values are ids (or 'me'), not names. Pass [] for a view with no filters — unlike a listing, it then shows every status.
sort_byNoStored sort order, e.g. [['due_date', 'asc'], ['id', 'desc']]. Unknown keys are rejected locally, listing the allowed set. Omit for the default.
group_byNoColumn to group results by, e.g. 'status', 'assignee'. Makes run_query return 'groups' with per-group counts. Omit for a flat list.
project_idNoNumeric project id the view belongs to; from list_projects. Omit for a global view — project-scoped filters (version, category, subprojectId) are then rejected.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoQuery id — pass it to run_query as query_id.
nameNoQuery name as its author saved it.
notesNoWhat happened beyond the create itself: a failed star, filters OpenProject did not keep. Empty when everything landed as asked.
publicNoTrue when shared with everyone who can see the project; false when private to its owner.
filtersNoThe stored filters as readable sentences, e.g. 'Status open' or 'Assignee is (OR) Grace Hopper'. Empty when the query filters nothing.
projectNoOwning project, or null for a global (cross-project) query.
sort_byNoStored sort order, e.g. ['Finish date asc'].
starredNoTrue when the current user starred (favorited) it.
group_byNoColumn the results are grouped by, when the query groups.
updated_atNoISO 8601 UTC timestamp.
display_sumsNoTrue when the query asks for totals; then the result 'sums' is populated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.3.2
    • changedInput schema / properties / filters / description
      Previous value: -"The filters to store, in the same shape run_query's override_filters and list_work_packages' raw_filters take — e.g. [{'name': 'status', 'operator': 'o', 'values': []}, {'name': 'assignee', 'operator': '=', 'values': ['12']}]. Values are ids (or 'me'), not display names. Pass [] deliberately for a view that filters nothing: unlike a listing, a stored query with no filters shows every status."New value: +"The filters to store, same shape as run_query's override_filters / list_work_packages' raw_filters, e.g. [{'name': 'status', 'operator': 'o', 'values': []}, {'name': 'assignee', 'operator': '=', 'values': ['12']}]. Values are ids (or 'me'), not names. Pass [] for a view with no filters — unlike a listing, it then shows every status."
    • changedInput schema / properties / group_by / description
      Previous value: -"Column to group the results by, e.g. 'status', 'assignee', 'type' or 'version'. Grouping is what makes run_query return 'groups' with per-group counts. Omit for a flat list."New value: +"Column to group results by, e.g. 'status', 'assignee'. Makes run_query return 'groups' with per-group counts. Omit for a flat list."
    • changedInput schema / properties / name / description
      Previous value: -"Name the view is saved under, e.g. 'Overdue in Platform'. Names are not unique upstream, so a second save with the same name creates a second view."New value: +"Name the view is saved under, e.g. 'Overdue in Platform'. Not unique upstream — a repeat name creates a second view."
    • changedInput schema / properties / project_id / description
      Previous value: -"Numeric project id the view belongs to, from list_projects. Omit for a global (cross-project) view — but project-scoped filters such as version, category or subprojectId are then rejected."New value: +"Numeric project id the view belongs to; from list_projects. Omit for a global view — project-scoped filters (version, category, subprojectId) are then rejected."
    • changedInput schema / properties / public / description
      Previous value: -"true shares the view with everyone who can see the project; false (default) keeps it private to the authenticated user. Sharing usually needs the 'manage public queries' permission."New value: +"true shares the view with everyone who can see the project; false (default) keeps it private. Sharing usually needs 'manage public queries'."
    • changedInput schema / properties / sort_by / description
      Previous value: -"Stored sort order, e.g. [['due_date', 'asc'], ['id', 'desc']]. Keys are the snake_case work-package columns list_work_packages sorts by; unknown keys are rejected locally with the allowed set listed. Omit for the default."New value: +"Stored sort order, e.g. [['due_date', 'asc'], ['id', 'desc']]. Unknown keys are rejected locally, listing the allowed set. Omit for the default."
    • changedInput schema / properties / star / description
      Previous value: -"Also star (favorite) the view for the authenticated user, so it appears in their sidebar. Done as a second call after the query exists; if it fails the query is still saved and 'notes' says so."New value: +"Also star (favorite) the view, so it appears in the sidebar. A second call after the query exists; a failure still leaves it saved (noted in 'notes') — don't re-save."
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Description discloses validation via POST /queries/form, that invalid filters produce violations and nothing is saved, and that star failures still leave the query saved. It also warns about custom-field filter ambiguity and fewer filters being kept, going well beyond the annotations.

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

Conciseness5/5

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

Long but dense and well-structured: purpose, usage, validation, return shape, pitfalls, and cross-references each occupy a clear section. No filler; the length is justified by the tool's complexity.

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

Completeness5/5

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

For a 7-parameter tool with an output schema, the description covers validation behavior, return contents, failure modes, and sibling relationships. The cross-references to list_queries, run_query, list_work_packages, and list_projects close the remaining context gaps.

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 coverage is 100% and the schema already documents each parameter in detail, so the baseline is 3. The description adds useful extras like values being ids (or 'me'), empty arrays showing every status, and custom-field filters being sent as plain values, so it earns a 4.

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?

States a specific verb and resource: 'Save a filter set as a reusable OpenProject view.' It distinguishes itself from siblings by clarifying the saved view is runnable via run_query and listable via list_queries, so an agent can tell it apart.

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?

Explicitly says when to use it ('Use it to keep a filter combination... instead of rebuilding it each session'), tells the agent to validate filters with list_work_packages first, and names alternatives (list_queries, run_query, list_projects). It also states editing/deleting are not offered and should be done in the UI.

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