Skip to content

pha_task_search_advanced: add include_description parameter to reduce payload size #42

@pfrenssen

Description

@pfrenssen

When agents use pha_task_search_advanced to reconcile task lists or check status across many tickets, the full task description is rarely needed — but it typically accounts for 70–90% of each task's payload.

To reduce the payload size, we can add an include_description: bool parameter (default True) that strips fields.description from results when set to False.

Motivation

A typical maniphest.search response for a single task is ~3–4 KB. For a batch of 100 tasks, the full payload is ~100–120 KB, of which ~80–100 KB is description text. Agents that only need task metadata (id, title, status, priority, assignee) are paying a large token and bandwidth cost for data they discard.

Proposed change

Add include_description: bool = True to pha_task_search_advanced. When False, strip fields.description from each task before returning. All other fields are unaffected.

# Only fetch metadata — omit description text
results = pha_task_search_advanced(
    projects=["PHID-PROJ-..."],
    include_description=False,
)

Design notes

  • Backward compatible — default is True, existing callers are unaffected.
  • Client-side filtering — the Conduit API does not support field exclusion in maniphest.search, so the field is stripped from the response after retrieval.
  • Consistent with existing pattern — mirrors the existing include_subscribers, include_projects, and include_columns parameters on the same tool.
  • Upstream-friendly — minimal surface area, no new tool, no breaking changes.

Alternatives considered

  • Separate slim tool (pha_task_search_metadata) — rejected as redundant; include_description=False on the existing tool is sufficient and avoids API sprawl.
  • Field allowlist parameter — more flexible but over-engineered for the stated use case; can be added later if demand arises.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions