get-tag-by-name
Fetch tag details by specifying the fully qualified name. Optionally include fields and filter by deletion status.
Instructions
Get tag by fully qualified name
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fqn | Yes | Fully qualified name (e.g. 'Classification.TagName') | |
| fields | No | Comma-separated fields to include | |
| include | No |
Implementation Reference
- src/tools/tags.ts:101-104 (handler)The handler function that executes the 'get-tag-by-name' tool logic. It accepts params with 'fqn' (fully qualified name), optional 'fields', and optional 'include', then calls omClient.get on the /tags/name/:fqn endpoint.
export async function getTagByName(params: z.infer<typeof getTagByNameSchema>) { const { fqn, ...query } = params; return omClient.get(`/tags/name/${encodeURIComponent(fqn)}`, query); } - src/tools/tags.ts:95-99 (schema)Zod schema for the 'get-tag-by-name' tool, defining the input parameters: fqn (string), fields (optional string), include (optional enum: non-deleted, deleted, all).
export const getTagByNameSchema = z.object({ fqn: z.string().describe("Fully qualified name (e.g. 'Classification.TagName')"), fields: z.string().optional().describe("Comma-separated fields to include"), include: z.enum(["non-deleted", "deleted", "all"]).optional(), }); - src/index.ts:329-329 (registration)Registration of the 'get-tag-by-name' tool with the MCP server, binding the schema (getTagByNameSchema.shape) and handler (getTagByName) via wrapToolHandler.
tool("get-tag-by-name", "Get tag by fully qualified name", getTagByNameSchema.shape, wrapToolHandler(getTagByName)); - src/index.ts:159-164 (helper)The tool registration helper function that wraps schema and handler, applies category-based filtering (OM_TOOLS / OM_DISABLE), and registers with the MCP server.
function tool(name: string, description: string, schema: any, handler: any): void { registry.register(name, description, currentCategory); if (registry.isEnabled(currentCategory)) { server.tool(name, description, schema, handler); } }