Skip to main content
Glama
Henzostudios

Claude Asset Tagging Agent

by Henzostudios

Claude Asset Tagging Agent

Copyright © Nikko Griffin | HenzoStudios

Overview

---

The Claude Asset Tagging Agent is a robust Model Context Protocol (MCP) server that connects large language models directly to Google Drive. It operates as an autonomous agent that reads files from any public Google Drive folder link, categorizes and tags each asset via Claude, and securely writes those tags back into the Drive file's description metadata while applying a star for rapid filtering.

Built as a working portfolio demo and field-ready enablement lab.

https://github.com/user-attachments/assets/c8aaacb6-8ee3-4cce-bfa3-ebcc2ce76eab

---

Key Features

---

  • Universal Public Folder Access: Dynamically reads asset manifests from any public Google Drive folder link.

  • Automated Asset Categorization: Claude acts as a creative pipeline tool, parsing filenames and metadata to assign categories (e.g., Video, Design Asset, Render/Image, 3D Asset).

  • Metadata Write-Back: Automatically updates the description field of files in Google Drive and stars processed assets.

  • Dual MCP Transports: Includes both local Stdio execution and cloud-ready HTTP Streamable transport options.

---

The Architecture: Dual MCP Implementation

---


\\\\\\\[ Claude.ai / Custom Connector ]
               │
               ▼ (Streamable HTTP / SSE)
     \\\\\\\[ server-remote.js (Express + MCP SDK) ]
               │
               ▼ (HTTP GET / JSON Web App Endpoint)
     \\\\\\\[ Code.gs (Google Apps Script Gateway) ]
               │
               ▼ (DriveApp Native API)
      \\\\\\\[ Google Drive Workspace ]

\\\*\\\*The Architecture: Dual MCP Implementation\\\*\\\*

---

The Model Context Protocol establishes a standard client-server connection between AI agents and external data. 
To ensure this tool can be run in any environment, this repository contains two distinct server implementations 
pointing to a shared Google Apps Script microservice.



\\\*\\\*Remote HTTP Server (server-remote.js):\\\*\\\* 
Utilizes the Streamable HTTP transport wrapped in an Express server. 
Designed to be hosted on cloud platforms like Replit and connected directly to Claude.ai via Custom Connectors.



\\\*\\\*Local Stdio Server (server.js):\\\*\\\* 
Utilizes standard input/output communication. The default mode for local development 
and connecting to desktop clients like Claude Desktop.



\\\*\\\*The Backend Microservice (Code.gs):\\\*\\\* 
A serverless Google Apps Script acts as the secured gateway, safely interacting 
with Google's DriveApp API and bypassing the need for complex Google OAuth flows in the Node.js application.



\\\*\\\*Setup Instructions:\\\*\\\* 
Replit \\\\\\\& Claude.ai Custom Connector

This guide walks through deploying the Remote HTTP server on Replit and connecting it to a free Claude.ai account 
using a Custom Connector.



**\*\*\\\*\\\*Step 1: Deploy the Backend Microservice\\\*\\\*\*\***


Go to Google Apps Script and create a new project.



Paste the contents of Code.gs into the editor.



Click Deploy -> New deployment.



Select Web app, set access to "Anyone", and deploy. (No URL pasting required for the MCP server—the endpoint is 
already configured in the JS files).



**\\\*\\\*Step 2: Spin up the Replit Server\\\*\\\***


Upload the project files to a Replit Node.js container.



Open the Replit Shell and install dependencies by running: npm install



Start the HTTP server by running: node server-remote.js



You should see a terminal output confirming the server is listening on 0.0.0.0:3000.



Grab the public URL provided by Replit's webview (e.g., https://your-repl-name.your-username.replit.dev).



**\\\*\\\*Step 3: Add to Claude.ai\\\*\\\***


Log into Claude.ai and navigate to Settings -> Connectors.



Click Add custom connector.



Paste your Replit URL and append /mcp to the very end of it (e.g., https://<YOUR-REPLIT-URL>.replit.dev/mcp).



Click Add.



**\\\*\\\*Step 4: Run the Agent\\\*\\\***


Start a new chat in Claude with your connector enabled and use a prompt like:



"Use the Asset Tagging agent to list all the files inside this Google Drive folder link: \\\\\\\[YOUR\\\\\\\_PUBLIC\\\\\\\_FOLDER\\\\\\\_LINK], then tag them."



Troubleshooting \\\\\\\& Known Issues

During development and testing, a few infrastructure and cloud-networking realities were encountered. If you run into issues, check here first:



**\\\*\\\*1. The "Folder ID Not Permitted" Error\\\*\\\***

Symptom: Claude returns an error saying the tool blocked the request because the Folder ID isn't permitted.



Cause: Google Apps Script does not automatically push saved code live. If you update Code.gs in the editor, 
the active web URL still runs the old code.



Fix: In Google Apps Script, go to Deploy -> Manage deployments. Click the Edit (pencil) icon, change the 
Version dropdown to New version, and click Deploy.



**\\\*\\\*2. "Failed to Connect" on First Try (Replit Cold Starts)\\\*\\\***

Symptom: When adding the connector or sending the very first prompt, Claude says the connection failed.



**\\\*\\\*Cause:\\\*\\\*** Free Replit containers go into a "sleep mode" after a few minutes of inactivity. When Claude pings 
the server, Replit takes a few seconds to wake up (a cold start), which occasionally causes Claude's initial 
handshake to time out.



**\\\*\\\*Fix:\\\*\\\*** Simply click Try Again or resend the prompt. Once the Replit container is awake, it will connect instantly.



**\\\*\\\*3.** Connector Timeouts on Bulk Tagging (Parallel Requests)\\\*\\\*

Symptom: Claude successfully tags one file but hits a "connector isn't responding" error on the rest of the files 
in the folder.



**\\\*\\\*Cause:\\\*\\\*** When told to tag a list of files, the LLM fires a burst of parallel tag\\\\\\\_drive\\\\\\\_file tool calls all at the 
exact same time. Because Google Apps Script takes 1-2 seconds to physically write metadata to each file, this data 
bottleneck can trigger Claude's HTTP connector timeout threshold.



**\\\*\\\*Fix:\\\*\\\*** If a file times out, just tell Claude "Try tagging \\\\\\\[Filename] again." To prevent this entirely during bulk 
operations, adjust your prompt to enforce sequential processing: "Tag the remaining files one by one, waiting for 
each to finish before starting the next."



**\\\*\\\*4. "Your App is Not Running" / Replit Port Binding\\\*\\\***

Symptom: The Replit Preview pane shows a grey "Your app is not running" screen, or a browser returns a JSON Method 
not allowed error.



**\\\*\\\*Cause:\\\*\\\*** By default, standard web apps bind to localhost (127.0.0.1), which makes them invisible to the outside internet.



**\\\*\\\*Fix:\\\*\\\*** This is already solved in the codebase! The createMcpExpressApp({ host: "0.0.0.0" }) configuration explicitly binds 
the server to 0.0.0.0. Ignore the Replit browser preview—MCP HTTP servers are strictly API endpoints meant to receive POST 
requests from LLMs, so rejecting a standard web browser view is proof that the security is working correctly.



**\\\*\\\*File Structure\\\*\\\***

---

server-remote.js — HTTP version for cloud hosting / Replit / Claude.ai connectors.



server.js — Stdio version for local testing / Claude Desktop.



Code.gs — Google Apps Script backend code (bypasses heavy OAuth).



package.json — Project dependencies (@modelcontextprotocol/sdk, express, zod).


Now you can simply tell Claude to organize your Google Drive with this simple prompt:

Use the Asset Tagging agent to list all the files inside this 

Google Drive folder link: Your Google Drive Link

Once listed, analyze each asset and tag all of them using the batch tool.

Available Tools

2 tools
list_drive_filesA

List up to 15 files inside a specific Google Drive folder.

ParametersJSON Schema
NameRequiredDescriptionDefault
folderIdYesThe specific Google Drive Folder ID to read from.

TDQS

A3.5/5.0
Behavior3/5

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

Description reveals the 15-file limit, which is a behavioral trait. However, with no annotations, it fails to disclose permissions, error handling, or read-only nature. Adds some value but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with 12 words, front-loaded with action and resource. No redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description covers the limit but omits details like return fields, ordering, or pagination. Adequate but not fully complete.

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%, and the description repeats the schema's parameter explanation. No additional semantics beyond what the schema already provides.

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?

Description clearly states the verb 'list' and specific resource 'files inside a specific Google Drive folder', with an explicit limit of 15 files. It differentiates from sibling tool 'tag_drive_file'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives, or when not to use it. The sibling is about tagging, but there is no mention of alternative listing methods or context for usage.

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

tag_drive_fileA

Star a file and add AI-generated category and tags to its Drive description.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsYesArray of up to 3 short string tags.
fileIdYesThe Google Drive File ID.
categoryYesThe primary category (e.g., 3D Asset, Video, Render/Image).

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries full burden. It discloses that category and tags are AI-generated and that the file's description is modified, but does not detail whether existing description is overwritten, appending behavior, or required permissions. Adequate but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, directly states purpose, no unnecessary words. Efficient and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 3 required parameters, no output schema, and no annotations, the description covers the main action but misses details on return behavior, error handling, and edge cases. Acceptable for a straightforward modification tool but could be more informative.

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 coverage is 100%, so baseline is 3. The description adds no new parameter details beyond what the input schema already provides. It names 'category' and 'tags' but schema descriptions are sufficient.

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 the tool's action: 'Star a file and add AI-generated category and tags to its Drive description.' It specifies the verb ('Star', 'add'), resource ('Drive file'), and distinguishes from sibling 'list_drive_files' which is a read operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives or prerequisites. The description does not mention file existence, permissions, or when not to use it. Sibling tool is only for listing, so little conflict, but still lacks usage context.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.0.0
    • First observedlist_drive_files
    • First observedtag_drive_file

TDQS

A3.6/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have entirely distinct purposes: listing files in a folder versus tagging a specific file. There is no ambiguity or overlap.

Naming Consistency5/5

Both tool names follow a consistent verb_noun pattern (list_drive_files, tag_drive_file) using snake_case, making them predictable and clear.

Tool Count3/5

With only two tools, the server feels minimal but still reasonably scoped for a focused tagging agent. It just barely covers the core actions, though more tools might be expected for a richer workflow.

Completeness3/5

The domain is Google Drive file tagging, and the tools cover listing and tagging. However, missing operations like untagging, updating tags, or searching tagged files leave notable gaps for a complete tagging workflow.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers