SiYuan icon

SiYuan

Manage SiYuan notebooks, documents, blocks, attributes, and more. Designed for AI agent workflows.

Tag → Find Blocks by Tag

AI-generated

Summary

Finds SiYuan blocks whose stored tag text contains the supplied tag name, returning matching block records ordered by most recently updated.

Inputs

  • Tag (required) — Tag name without the # symbol. The implementation inserts this value into a SQL LIKE pattern when querying block attributes.

Output shape

A list of matching block records.

Runs a SQL query equivalent to SELECT * FROM blocks WHERE ial LIKE '%tag=%<tag>%' ORDER BY updated DESC. This is a substring match on the stored attribute text; results are ordered newest first. The query does not verify that the supplied name is an exact, comma-delimited tag.

Links

Discussion