Skip to main content
Glama
tomek7667

mcp-ctftime

by tomek7667

ctftime_team

Get detailed information about a CTFtime team using its unique team ID. Access team data from the CTFtime API.

Instructions

Get information about a specific team by team_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
team_idYesCTFtime team id.

Implementation Reference

  • Registration and handler for the 'ctftime_team' tool. Uses server.registerTool to define the tool with an input schema requiring a team_id (positive integer), then fetches team data from the CTFtime API at '/teams/{team_id}/' and returns the JSON response as text content.
    server.registerTool(
    	"ctftime_team",
    	{
    		description: "Get information about a specific team by team_id.",
    		inputSchema: {
    			team_id: z.number().int().min(1).describe("CTFtime team id."),
    		},
    	},
    	async ({ team_id }) => {
    		const url = `${CTFtime_API_BASE}/teams/${team_id}/`;
    		const data = await getJson<any>(url);
    		return {
    			content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
    		};
    	}
    );
  • src/index.ts:169-184 (registration)
    The tool is registered via server.registerTool with the name 'ctftime_team'.
    server.registerTool(
    	"ctftime_team",
    	{
    		description: "Get information about a specific team by team_id.",
    		inputSchema: {
    			team_id: z.number().int().min(1).describe("CTFtime team id."),
    		},
    	},
    	async ({ team_id }) => {
    		const url = `${CTFtime_API_BASE}/teams/${team_id}/`;
    		const data = await getJson<any>(url);
    		return {
    			content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
    		};
    	}
    );
  • The getJson helper function used by the handler to fetch data from the CTFtime API with proper headers and 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;
    }
Behavior3/5

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

No annotations provided. Description implies a read operation but lacks details on data freshness, rate limits, or response structure. Adequate but not rich.

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 concise sentence front-loading the purpose with no extraneous information.

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

Completeness4/5

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

Simple tool with one parameter and no output schema; description covers the essential purpose. Minor gaps like authentication or error handling, but adequate for the complexity.

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 'CTFtime team id.' for team_id. Description adds no additional meaning beyond the schema, so baseline 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?

Description clearly states 'Get information about a specific team by team_id.' with a specific verb and resource, distinguishing it from siblings like ctftime_events or ctftime_top_teams.

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 like ctftime_top_by_country or ctftime_events. The description only states what it does.

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