Skip to main content
Glama
tomek7667

mcp-ctftime

by tomek7667

ctftime_event

Retrieve comprehensive details for a CTFtime event by providing its unique event identifier.

Instructions

Get full details for a specific CTFtime event by event_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_idYesCTFtime event id.

Implementation Reference

  • Handler function for the ctftime_event tool. Takes event_id, fetches full event details from CTFtime API /events/{event_id}/, and returns the data as formatted JSON text.
    server.registerTool(
    	"ctftime_event",
    	{
    		description: "Get full details for a specific CTFtime event by event_id.",
    		inputSchema: {
    			event_id: z.number().int().min(1).describe("CTFtime event id."),
    		},
    	},
    	async ({ event_id }) => {
    		const url = `${CTFtime_API_BASE}/events/${event_id}/`;
    		const data = await getJson<any>(url);
    		return {
    			content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
    		};
    	}
    );
  • Schema definition for ctftime_event tool. Accepts a single required integer event_id parameter (min 1).
    "ctftime_event",
    {
    	description: "Get full details for a specific CTFtime event by event_id.",
    	inputSchema: {
    		event_id: z.number().int().min(1).describe("CTFtime event id."),
    	},
  • src/index.ts:96-111 (registration)
    Registration of the ctftime_event tool on the MCP server via server.registerTool().
    server.registerTool(
    	"ctftime_event",
    	{
    		description: "Get full details for a specific CTFtime event by event_id.",
    		inputSchema: {
    			event_id: z.number().int().min(1).describe("CTFtime event id."),
    		},
    	},
    	async ({ event_id }) => {
    		const url = `${CTFtime_API_BASE}/events/${event_id}/`;
    		const data = await getJson<any>(url);
    		return {
    			content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
    		};
    	}
    );
  • Generic helper function getJson<T>() used by the handler to fetch and parse JSON from the CTFtime API with proper error handling.
    async function getJson<T>(url: string): Promise<T> {
    	const res = await fetch(url, {
    		headers: {
    			Accept: "application/json",
    			// CTFtime doesn't require a UA header for this API, but it helps with debugging and etiquette.
    			"User-Agent": "mcp-ctftime/0.1.0 (+https://ctftime.org/api/)",
    		},
    	});
    	if (!res.ok) {
    		const text = await res.text().catch(() => "");
    		throw new Error(
    			`CTFtime API error ${res.status} for ${url}${
    				text ? `: ${text.slice(0, 300)}` : ""
    			}`
    		);
    	}
    	return (await res.json()) as T;
    }
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It merely states 'Get full details' without explaining what 'full details' includes, potential errors, rate limits, or authentication requirements. This lack of detail is insufficient.

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, concise sentence with no extraneous information. It is front-loaded with the purpose and required parameter, making it easy to parse.

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 absence of an output schema and annotations, the description is minimally adequate but lacks details on the return format, error handling, or examples. For a simple retrieval tool it may suffice, but it 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?

The schema already describes the event_id parameter adequately ('CTFtime event id.'). The description adds no new semantic information about the parameter beyond what the schema provides, so a baseline score 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 clearly specifies the action 'Get full details' and the resource 'specific CTFtime event' with the required identifier 'by event_id.' It effectively distinguishes this tool from siblings like ctftime_events (which likely lists events) and others.

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 when an event_id is known and full details are needed, but it does not provide explicit guidance on when to use this tool over alternatives, nor does it mention any prerequisites or exclusions.

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/tomek7667/mcp-ctftime'

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