Skip to main content
Glama
brilliantdirectories

brilliant-directories-mcp

Official

createTagRelationship

Attach an existing tag to a member, post, or other record by providing tag_id, object_id, tag_type_id, and added_by. Pre-check via listTagRelationships to avoid duplicate links.

Instructions

Create a tag relationship - Create a new tagrelationship record. Writes live data.

Use when: attaching an existing tag to a record (member, post, etc.). The alternative for members is setting the member_tags field via updateUser with member_tag_action=1.

Required: tag_id, object_id, tag_type_id, added_by.

Pre-check before create (TRIPLE uniqueness): BD does NOT enforce uniqueness on the (tag_id, object_id, tag_type_id) triple. Attaching the same tag to the same object twice produces two rel_tag rows, which inflates tag counts on admin reports and can cause some widgets to render the same tag chip twice on the same record. Filter-find pattern (single-field server filter + client-side intersect - the server does not yet honor array-syntax multi-condition filters): call listTagRelationships property=tag_id property_value=<proposed tag_id> property_operator== to narrow to all rows for that tag, then CLIENT-SIDE filter to rows where object_id=<proposed object_id> AND tag_type_id=<proposed tag_type_id>. Zero results after client-side intersect = link free; >=1 = already attached. If the link already exists: skip the create (idempotent - the tag is already on the object). Never silently double-link.

Parameter interactions:

  • Attaches an existing tag to an existing record. Both sides must exist - use listTags and the target resource's list to discover IDs

See also: updateTagRelationship (modify existing).

tag_type_id + object_id - how to target the right record (from BD tag_types table):

The tag_type_id determines WHICH resource/table the object_id lives in. Discover mapping via listTagTypes - each tag type row has a table_relation field naming its target table. Example mapping:

tag_type_id

type_name

Target table (table_relation)

What object_id references

1

Users

users_data

user_id

(other rows)

(other types)

e.g. data_widgets, menus, forms

That table's primary key

Process: call listTagTypes first to see the tag_type_id -> table_relation mapping on your site, then pick the appropriate tag_type_id and supply the matching record's PK as object_id. Widgets, menus, and forms all support tags via the same tag_type_id + object_id lookup pattern.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tag_idYesInteger PK of the tag (`tags.id`) passed as a string per the underlying `varchar(500)` column. The schema column comment says "name of the tag" — that's legacy and misleading; BD stores the integer ID stringified. Discover via `listTags`.
object_idYesPrimary key of the record being tagged. Which table it lives in depends on tag_type_id - look up via listTagTypes. For tag_type_id=1 (Users), object_id is a user_id from users_data.
tag_type_idYesTag type classifier ID - determines which TABLE the `object_id` references. Call `listTagTypes` first to see the `tag_type_id` -> `table_relation` mapping. Example: `tag_type_id=1` usually means Users (`table_relation=users_data`), so `object_id` would be a `user_id`. Other tag types may target widgets, menus, forms.
added_byYes
Behavior5/5

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

Annotations indicate readOnlyHint=false, destructiveHint=false, idempotentHint=false, and openWorldHint=true. The description adds critical context: it explains the non-uniqueness issue (no DB check), the risk of duplicate rows, and recommends a filter-find pattern to prevent double-linking. This goes well beyond the annotations, clarifying the actual behavior.

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 lengthy but well-structured with headings, bullet points, and a table. While every sentence adds value, some redundancy exists (e.g., repeating parameter interactions). It could be slightly more concise, but the structure aids readability.

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?

Given the complexity (4 parameters, no output schema, and a uniqueness pitfall), the description covers all necessary aspects: prerequisites, parameter relationships, pre-check pattern, alternative methods, and discovery via listTagTypes. It is complete enough for an agent to use the tool correctly without additional lookup.

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

Parameters5/5

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

Schema coverage is 75% (3 of 4 parameters described), and the description adds substantial meaning: it explains how tag_id relates to listTags, how object_id and tag_type_id interact, and provides a table mapping tag_type_id to target tables. It also clarifies the 'added_by' parameter implicitly through context. The description compensates for the missing schema description on 'added_by' and enriches all parameters.

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 clearly states it creates a tag relationship record and writes live data. It distinguishes from alternatives like setting member_tags via updateUser and mentions updateTagRelationship for modifications, so the purpose is well-defined and differentiated from siblings.

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?

Provides explicit 'Use when' guidance for attaching tags to records, lists required parameters, and gives detailed pre-check instructions to avoid duplicates. It also names alternatives (updateUser for members) and see-also (updateTagRelationship), offering clear context for when to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/brilliantdirectories/brilliant-directories-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server