Skip to main content
Glama

edubase_delete_exam_branding

DestructiveIdempotent

Remove branding from exams to present a clean, professional appearance. Specify the exam by its ID to strip all associated branding elements.

Instructions

Remove branding from an exam.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
examYesexam identification string

Implementation Reference

  • Schema definition for edubase_delete_exam_branding - defines input schema (requires 'exam' string) and output schema (empty object). The tool removes branding from an exam via DELETE /exam:branding.
    // DELETE /exam:branding - Remove branding from an exam
    {
    	name: 'edubase_delete_exam_branding',
    	description: "Remove branding from an exam.",
    	inputSchema: z.object({
    		exam: z.string().describe('exam identification string'),
    	}),
    	outputSchema: z.object({}).optional(),
    },
  • src/tools.ts:95-108 (registration)
    The tool is exported as part of EDUBASE_API_TOOLS_EXAMS which is spread into the consolidated EDUBASE_API_TOOLS array, then passed through withToolAnnotations to add metadata (destructiveHint=true for DELETE methods).
    export const EDUBASE_API_TOOLS = [
    	...EDUBASE_API_TOOLS_COMMON,
    	...EDUBASE_API_TOOLS_QUESTIONS,
    	...EDUBASE_API_TOOLS_EXAMS,
    	...EDUBASE_API_TOOLS_PLAYS,
    	...EDUBASE_API_TOOLS_QUIZES,
    	...EDUBASE_API_TOOLS_USERS,
    	...EDUBASE_API_TOOLS_CLASSES,
    	...EDUBASE_API_TOOLS_ORGANIZATIONS,
    	...EDUBASE_API_TOOLS_INTEGRATIONS,
    	...EDUBASE_API_TOOLS_TAGS,
    	...EDUBASE_API_TOOLS_PERMISSIONS,
    	...EDUBASE_API_TOOLS_METRICS
    ] as EduBaseApiTool[];
  • src/index.ts:203-264 (registration)
    Generic handler registration: The tool is registered via server.registerTool() using a generic handler that parses the tool name to extract HTTP method (DELETE) and endpoint (exam:branding), then calls sendEduBaseApiRequest to make the actual API call.
    Object.values(EDUBASE_API_TOOLS_ANNOTATED).forEach((tool) => {
    	/* Register tools */
    	server.registerTool(tool.name, {
    		description: tool.description,
    		inputSchema: tool.inputSchema as any,
    		outputSchema: tool.outputSchema as any,
    		annotations: tool.annotations,
    	}, async (args: any, ctx: any): Promise<CallToolResult> => {
    		try {
    			const name = tool.name;
    			/* Decompose request and check arguments */
    			if (!name.match(/^edubase_(get|post|delete)/)) {
    				throw new Error('Invalid tool configuration');
    			}
    			if (!args) {
    				throw new Error('No arguments provided');
    			}
    
    			/* Prepare and send API request */
    			const [ , method, ...endpoint ] = name.split('_');
    			const response = await sendEduBaseApiRequest(method, (apiUrl || EDUBASE_API_URL) + '/' + endpoint.join(':'), args, authentication);
    
    			/* Return response */
    			if (z.object({}).strict().safeParse(tool.outputSchema).success) {
    				/* Endpoint with empty output schema */
    				return {
    					content: [{ type: 'text', text: '{}' }],
    					structuredContent: {},
    					isError: false,
    				};
    			} else if (response.length == 0) {
    				/* Endpoint without response */
    				return {
    					content: [{ type: 'text', text: 'Success.' }],
    					isError: false,
    				};
    			}
    			else if (typeof response != 'object') {
    				/* Response should be an object (hash or list) at this point */
    				throw new Error('Invalid response');
    			}
    			else
    			{
    				/* Return response (schema will be validated automatically) */
    				return {
    					content: [{ type: 'text', text: JSON.stringify(response) }],
    					structuredContent: response,
    					isError: false,
    				};
    			}
    		} catch (error) {
    			/* Request failed */
    			return {
    				content: [{
    					type: 'text',
    					text: `${error instanceof Error ? error.message : String(error)}`,
    				}],
    				isError: true,
    			};
    		}
    	});
    });
  • The sendEduBaseApiRequest function is the actual HTTP handler: it converts the method to uppercase (DELETE), sends the request to the EduBase API endpoint (exam:branding), and returns the response.
    async function sendEduBaseApiRequest(method: string, endpoint: string, data: object, authentication: EduBaseAuthentication | null) {
    	/* Check method and endpoint */
    	method = method.toUpperCase()
    	if (!['GET', 'POST', 'DELETE'].includes(method)) {
    		throw new Error('Invalid method: "' + method + '"');
    	}
    	if (endpoint.length == 0) {
    		throw new Error('Invalid endpoint');
    	}
    
    	/* Check rate limit */
    	checkRateLimit();
    
    	/* Prepare authentication (prefer EDUBASE_API_APP and EDUBASE_API_KEY environment variables) */
    	if (!authentication) {
    		authentication = { app: EDUBASE_API_APP, secret: EDUBASE_API_KEY };
    	} else {
    		if (!authentication.hasOwnProperty('app') || authentication.app.length == 0 || EDUBASE_API_APP.length > 0) {
    			authentication.app = EDUBASE_API_APP;
    		}
    		if (!authentication.hasOwnProperty('secret') || authentication.secret.length == 0 || EDUBASE_API_KEY.length > 0) {
    			authentication.secret = EDUBASE_API_KEY;
    		}
    	}
    
    	/* Send request with input data */
    	let headers = {
    		'Content-Type': 'application/json',
    		'Accept-Encoding': 'gzip',
    		'EduBase-API-Client': 'MCP',
    		'EduBase-API-Transport': (STREAMABLE_HTTP) ? 'Streamable HTTP' : ((SSE) ? 'SSE' : 'Stdio'),
    		'EduBase-API-App': authentication.app,
    		'EduBase-API-Secret': authentication.secret
    	};
    	const response = await fetch(endpoint + (method == 'GET' ? '?' + queryString.stringify(data) : ''), {
    		method: method,
    		body: (method != 'GET' ? JSON.stringify(data) : undefined),
    		headers: headers
    	});
    	if (!response.ok) {
    		throw new Error(`EduBase API error: ${response.status} ${response.statusText}` + (response.headers.has('EduBase-API-Error') ? ` (${response.headers.get('EduBase-API-Error')})` : ''));
    	}
    
    	/* Parse response and return as object */
    	let clonedResponse = response.clone();
    	try {
    		/* First try to decode as JSON */
    		return await response.json();
    	} catch (error) {
    		/* Response might be empty string with a 200 status code */
    		return await clonedResponse.text();
    	}
    }
  • The inferToolAnnotations helper function marks DELETE tools as destructiveHint: true and idempotentHint: true, which applies to edubase_delete_exam_branding.
    function inferToolAnnotations(tool: EduBaseApiTool): EduBaseToolAnnotations {
       const method = getToolMethod(tool.name);
       const readOnly = method === 'get';
       const destructive = method === 'delete';
       const idempotent = method === 'get' || method === 'delete';
    
       return {
          title: getToolTitle(tool),
          readOnlyHint: readOnly,
          destructiveHint: readOnly ? false : destructive,
          idempotentHint: idempotent,
          openWorldHint: false,
       };
    }
Behavior2/5

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

Annotations already indicate destructive and idempotent behavior. The description adds no context about side effects (e.g., whether branding must exist, impact on exam state, or reversibility). Minimal value beyond structured data.

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, no extraneous words. Perfectly concise.

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 one-parameter delete tool with annotations, the description is adequate but lacks detail on effects (e.g., does it fail if no branding?). Not as comprehensive as it could be.

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 'exam identification string' for the parameter. The tool description does not add extra meaning, so baseline of 3 is appropriate.

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 'Remove branding from an exam' clearly states the action (remove) and resource (branding on an exam), distinguishing it from sibling delete tools for other entities like edubase_delete_exam or edubase_delete_exam_permission.

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 (e.g., edubase_get_exam_branding or edubase_post_exam_branding). Prerequisites or conditions for removal are not mentioned.

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/EduBase/MCP'

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