Skip to main content
Glama

ap_search_triggers

ap_search_triggers
Read-onlyIdempotent

Find piece triggers (the event that starts a flow) by natural-language description of when the flow should run (e.g. "when a new row is added to a Google Sheet", "when an email arrives"). Returns the most semantically relevant triggers ranked by similarity — lightweight rows only — or an empty list when nothing in the catalog is relevant (it does not force a match). Always available: when no embedding model is configured it falls back to a keyword catalog search (response "mode":"keyword", lexical not semantic). Each row carries a connected flag indicating whether this project already has a connection for the piece. Optionally scope to a single piece with pieceName. This is the discovery step: take a result's pieceName + triggerName to ap_get_piece_props for its input schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of trigger matches to return. Defaults to 5.
queryYesNatural-language description of the event that should start the flow (e.g. "when a new row is added to a Google Sheet", "when a new email arrives").
pieceNameNoRestrict results to a single piece (e.g. "slack" or "@activepieces/piece-slack"). Omit to search the whole catalog.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses the return shape (lightweight rows only, similarity-ranked), the empty-list-on-no-match behavior, the keyword-fallback mode when no embedding model is configured ('mode':'keyword'), and the `connected` flag meaning. These are real behavioral traits not derivable from annotations or schema.

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?

Front-loaded with the core purpose and examples, then layers on ranking, fallback, flags, and the next step. It is dense but a single long paragraph; the fallback and next-step guidance could be split for scannability, but nothing is wasted.

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?

No output schema exists, yet the description describes the return contract (ranked lightweight rows, mode field, connected flag, empty list) adequately for an agent to consume results. Combined with the downstream-tool pointer, an agent has everything needed to call and use this tool.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents query, limit, and pieceName. The description reinforces pieceName scoping and repeats the query example, but adds no new syntax or format detail (e.g. limit bounds or ranking effects). Baseline 3 is appropriate.

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 (find piece triggers) plus the query semantics (natural-language description of when the flow should run), with concrete examples. It is clearly distinguishable from the sibling ap_search_actions, which searches actions rather than flow-starting events.

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 frames itself as the discovery step and routes the agent onward: 'take a result's pieceName + triggerName to ap_get_piece_props for its input schema.' It also sets expectations that no match is forced ('does not force a match') and that search may degrade to keyword mode, so the agent knows when not to trust semantic ranking.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources