Skip to main content
Glama
useshortcut

Shortcut MCP Server

Official
by useshortcut

workflows-get-default

Retrieve the default workflow for a specified team or the global default workflow when no team is provided.

Instructions

Get the default workflow for a specific team or the global default if no team is specified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamPublicIdNoThe public ID of the team to get the default workflow for.

Implementation Reference

  • The main handler function that retrieves the default workflow for a team or the global default, using the ShortcutClientWrapper.
    async getDefaultWorkflow(teamPublicId?: string) {
    	if (teamPublicId) {
    		try {
    			const teamDefaultWorkflowId = await this.client
    				.getTeam(teamPublicId)
    				.then((t) => t?.default_workflow_id);
    			if (teamDefaultWorkflowId) {
    				const teamDefaultWorkflow = await this.client.getWorkflow(teamDefaultWorkflowId);
    				if (teamDefaultWorkflow) {
    					return this.toResult(
    						`Default workflow for team "${teamPublicId}" has id ${teamDefaultWorkflow.id}.`,
    						await this.entityWithRelatedEntities(teamDefaultWorkflow, "workflow"),
    					);
    				}
    			}
    		} catch {}
    	}
    
    	const currentUser = await this.client.getCurrentUser();
    	if (!currentUser) throw new Error("Failed to retrieve current user.");
    
    	const workspaceDefaultWorkflowId = currentUser.workspace2.default_workflow_id;
    	const workspaceDefaultWorkflow = await this.client.getWorkflow(workspaceDefaultWorkflowId);
    
    	if (workspaceDefaultWorkflow) {
    		return this.toResult(
    			`${teamPublicId ? `No default workflow found for team with public ID "${teamPublicId}". The general default workflow has id ` : "Default workflow has id "}${workspaceDefaultWorkflow.id}.`,
    			await this.entityWithRelatedEntities(workspaceDefaultWorkflow, "workflow"),
    		);
    	}
    
    	return this.toResult("No default workflow found.");
    }
  • Registers the 'workflows-get-default' tool with the MCP server, including schema and handler reference.
    server.addToolWithReadAccess(
    	"workflows-get-default",
    	"Get the default workflow for a specific team or the global default if no team is specified.",
    	{
    		teamPublicId: z
    			.string()
    			.optional()
    			.describe("The public ID of the team to get the default workflow for."),
    	},
    	async ({ teamPublicId }) => await tools.getDefaultWorkflow(teamPublicId),
    );
  • Zod schema for the tool input parameters.
    {
    	teamPublicId: z
    		.string()
    		.optional()
    		.describe("The public ID of the team to get the default workflow for."),
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool retrieves data ('Get'), implying it's a read operation, but doesn't disclose behavioral traits such as authentication requirements, rate limits, error conditions, or what the return format looks like. This is inadequate for a tool with no annotation coverage.

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?

The description is a single, efficient sentence that front-loads the purpose and condition. There is no wasted language, and it directly communicates the tool's functionality without unnecessary elaboration.

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 the tool has no annotations, no output schema, and a simple input schema with full coverage, the description is minimally adequate. It covers the basic purpose and parameter usage but lacks details on behavior, return values, and differentiation from siblings, making it incomplete for optimal agent use.

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?

The schema description coverage is 100%, so the schema already documents the single parameter 'teamPublicId' with its description. The description adds no additional meaning beyond what's in the schema, such as examples or edge cases, but since schema coverage is high, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'default workflow', specifying it can be for a specific team or global. However, it doesn't explicitly differentiate from sibling tools like 'workflows-get-by-id' or 'workflows-list', which reduces clarity about when to choose this tool over those alternatives.

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

Usage Guidelines3/5

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

The description implies usage by mentioning 'for a specific team or the global default if no team is specified', which provides some context. However, it doesn't explicitly state when to use this tool versus alternatives like 'workflows-get-by-id' or 'workflows-list', nor does it mention any prerequisites or exclusions, leaving gaps in guidance.

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/useshortcut/mcp-server-shortcut'

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