Skip to main content
Glama
dipseth

google-workspace-unlimited

Create Template Macro

create_template_macro

Creates and registers custom Jinja2 macros for use in Google Workspace templates. Enables dynamic template customization by storing macros persistently or in-memory.

Instructions

Create and register a new Jinja2 template macro dynamically

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
macro_nameYesName of the macro to create (must be a valid Python identifier)
descriptionNoOptional description of the macro's purpose and functionality
macro_contentYesComplete Jinja2 macro definition including {% macro %} and {% endmacro %} tags
usage_exampleNoOptional usage example showing how to call the macro in templates
persist_to_fileNoWhether to save the macro to a .j2 file for permanent availability across server restarts
user_google_emailNoUse 'me' or 'myself' for auto-resolution to authenticated user, or provide specific email address. If None, uses current authenticated user (auto-injected by middleware).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
macroNoCreated macro information if successful
errorsNoList of error messages if creation failed
successYesWhether the macro was created successfully
usage_infoNoUsage information for the created macro
Behavior2/5

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

Annotations provide some behavioral hints (non-readonly, non-destructive, non-idempotent, open world), but the description adds little beyond 'dynamically'. It does not explain registration implications, persistence behavior, or output structure, missing opportunities to clarify side effects.

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 a single sentence, making it concise and front-loaded. However, it is minimal and could include more context without sacrificing brevity.

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

Completeness2/5

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

Given the tool's 6 parameters, output schema, and moderate complexity, the description is insufficient. It does not explain what 'register' entails, how the macro becomes available, or how it interacts with other template-related functionality.

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% with detailed parameter descriptions. The tool description adds no additional parameter-level information beyond what the schema already provides, leading to a baseline score of 3.

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 creates and registers a new Jinja2 template macro dynamically, with a specific verb+resource. It is distinct from sibling tools, none of which deal with template macros.

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 description lacks context about prerequisites or scenarios, leaving the agent without decision support.

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/dipseth/google_workspace_fastmcp2'

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