Skip to content

MCP Tools for Tag Management#185

Open
svashistatlan wants to merge 14 commits intomainfrom
svashist_ie_mcp
Open

MCP Tools for Tag Management#185
svashistatlan wants to merge 14 commits intomainfrom
svashist_ie_mcp

Conversation

@svashistatlan
Copy link
Copy Markdown

Added a new tags.py module that introduces full Tag Management capabilities, including functions to retrieve existing tags, create new tags, and update tag definitions within Atlan. In parallel, corresponding MCP tool wrappers were added to server.py, making these operations directly accessible through the Model Context Protocol for seamless use by Claude or other MCP-enabled clients.

Comment thread modelcontextprotocol/server.py Outdated
Comment thread modelcontextprotocol/server.py Outdated
Comment thread modelcontextprotocol/server.py Outdated
Comment thread modelcontextprotocol/tools/tags.py Outdated
Comment thread modelcontextprotocol/tools/tags.py Outdated
Comment thread modelcontextprotocol/tools/tags.py Outdated
Comment thread modelcontextprotocol/tools/tags.py Outdated
Comment thread modelcontextprotocol/tools/tags.py Outdated
Comment thread modelcontextprotocol/tools/tags.py Outdated
Comment thread modelcontextprotocol/tools/tags.py Outdated
Comment thread modelcontextprotocol/tools/tags.py Outdated
Comment thread modelcontextprotocol/tools/tags.py Outdated
Comment thread modelcontextprotocol/tools/tags.py Outdated
Comment on lines +1058 to +1060
if result.get("created"):
print(f"Created tag: {result['tag']['display_name']}")
print(f"GUID: {result['tag']['guid']}")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we dont need this.

created_def = atlan_tag_defs[0] if atlan_tag_defs else None

if not created_def:
error_msg = "Tag creation succeeded but no tag definition was returned."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
error_msg = "Tag creation succeeded but no tag definition was returned."
error_msg = "Tag creation failed, please try again."

@@ -1,5 +1,5 @@
version = 1
revision = 2
revision = 3
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we dont need this, its already upto date.

description: Optional[str] = None


ALLOWED_TAG_COLORS = {"GRAY", "GREEN", "YELLOW", "RED"}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove tag colors, as its not helpful.

# ---- New AtlanTagUpdate model ----
class AtlanTagUpdate(BaseModel):
name: str
color: Optional[str] = None
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, models are not passing this as an argument anyway (default to grey already)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants