Skip to main content
Glama

get-action

Retrieve detailed Trello action data by ID to track card changes, comments, and member activities for project oversight.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionIdYesID of the action to retrieve
displayNoInclude display information
entitiesNoInclude entity information
fieldsNoComma-separated list of fields to include
memberNoInclude member information
memberCreatorNoInclude member creator information
memberCreatorFieldsNoComma-separated list of member creator fields
memberFieldsNoComma-separated list of member fields

Implementation Reference

  • Handler function that retrieves the specified Trello action by making a GET request to the Trello API, handling optional parameters for additional data, and returning the JSON response or error.
    async ({ actionId, display, entities, fields, member, memberCreator, memberCreatorFields, memberFields }) => {
    	try {
    		if (!credentials.apiKey || !credentials.apiToken) {
    			return {
    				content: [
    					{
    						type: 'text',
    						text: 'Trello API credentials are not configured',
    					},
    				],
    				isError: true,
    			};
    		}
    
    		const url = new URL(`https://api.trello.com/1/actions/${actionId}`);
    		url.searchParams.append('key', credentials.apiKey);
    		url.searchParams.append('token', credentials.apiToken);
    		if (display !== undefined) url.searchParams.append('display', display.toString());
    		if (entities !== undefined) url.searchParams.append('entities', entities.toString());
    		if (fields) url.searchParams.append('fields', fields);
    		if (member !== undefined) url.searchParams.append('member', member.toString());
    		if (memberCreator !== undefined) url.searchParams.append('memberCreator', memberCreator.toString());
    		if (memberCreatorFields) url.searchParams.append('memberCreator_fields', memberCreatorFields);
    		if (memberFields) url.searchParams.append('member_fields', memberFields);
    
    		const response = await fetch(url.toString());
    		const data = await response.json();
    
    		return {
    			content: [
    				{
    					type: 'text',
    					text: JSON.stringify(data),
    				},
    			],
    		};
    	} catch (error) {
    		return {
    			content: [
    				{
    					type: 'text',
    					text: `Error getting action: ${error}`,
    				},
    			],
    			isError: true,
    		};
    	}
    }
  • Input schema using Zod for validating parameters of the get-action tool.
    {
    	actionId: z.string().describe('ID of the action to retrieve'),
    	display: z.boolean().optional().describe('Include display information'),
    	entities: z.boolean().optional().describe('Include entity information'),
    	fields: z.string().optional().describe('Comma-separated list of fields to include'),
    	member: z.boolean().optional().describe('Include member information'),
    	memberCreator: z.boolean().optional().describe('Include member creator information'),
    	memberCreatorFields: z.string().optional().describe('Comma-separated list of member creator fields'),
    	memberFields: z.string().optional().describe('Comma-separated list of member fields'),
    },
  • Registration of the 'get-action' tool with McpServer using server.tool(), including name, input schema, and handler function.
    	'get-action',
    	{
    		actionId: z.string().describe('ID of the action to retrieve'),
    		display: z.boolean().optional().describe('Include display information'),
    		entities: z.boolean().optional().describe('Include entity information'),
    		fields: z.string().optional().describe('Comma-separated list of fields to include'),
    		member: z.boolean().optional().describe('Include member information'),
    		memberCreator: z.boolean().optional().describe('Include member creator information'),
    		memberCreatorFields: z.string().optional().describe('Comma-separated list of member creator fields'),
    		memberFields: z.string().optional().describe('Comma-separated list of member fields'),
    	},
    	async ({ actionId, display, entities, fields, member, memberCreator, memberCreatorFields, memberFields }) => {
    		try {
    			if (!credentials.apiKey || !credentials.apiToken) {
    				return {
    					content: [
    						{
    							type: 'text',
    							text: 'Trello API credentials are not configured',
    						},
    					],
    					isError: true,
    				};
    			}
    
    			const url = new URL(`https://api.trello.com/1/actions/${actionId}`);
    			url.searchParams.append('key', credentials.apiKey);
    			url.searchParams.append('token', credentials.apiToken);
    			if (display !== undefined) url.searchParams.append('display', display.toString());
    			if (entities !== undefined) url.searchParams.append('entities', entities.toString());
    			if (fields) url.searchParams.append('fields', fields);
    			if (member !== undefined) url.searchParams.append('member', member.toString());
    			if (memberCreator !== undefined) url.searchParams.append('memberCreator', memberCreator.toString());
    			if (memberCreatorFields) url.searchParams.append('memberCreator_fields', memberCreatorFields);
    			if (memberFields) url.searchParams.append('member_fields', memberFields);
    
    			const response = await fetch(url.toString());
    			const data = await response.json();
    
    			return {
    				content: [
    					{
    						type: 'text',
    						text: JSON.stringify(data),
    					},
    				],
    			};
    		} catch (error) {
    			return {
    				content: [
    					{
    						type: 'text',
    						text: `Error getting action: ${error}`,
    					},
    				],
    				isError: true,
    			};
    		}
    	}
    );
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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/adriangrahldev/advanced-trello-mcp-server'

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