Skip to main content
Glama

choose_technology

Select an Apple development framework or technology to scope all subsequent searches and documentation lookups within the Apple documentation system.

Instructions

Select the framework/technology to scope all subsequent searches and documentation lookups

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
identifierNoOptional technology identifier (e.g. doc://.../SwiftUI)
nameNoTechnology name/title (e.g. SwiftUI)

Implementation Reference

  • Core handler implementation for the 'choose_technology' tool. Builds a function that selects a technology/framework by name or identifier using exact, fuzzy matching, validates it, updates server state, and returns markdown response with success or suggestions.
    export const buildChooseTechnologyHandler = ({client, state}: ServerContext) =>
    	async (args: {name?: string; identifier?: string}): Promise<ToolResponse> => {
    		const {name, identifier} = args;
    		const technologies = await client.getTechnologies();
    		const candidates = Object.values(technologies).filter(tech => typeof tech?.title === 'string' && typeof tech?.identifier === 'string');
    
    		// Normalize search terms - case insensitive
    		const normalizedName = name?.toLowerCase().trim();
    		const normalizedIdentifier = identifier?.toLowerCase().trim();
    
    		let chosen: typeof candidates[0] | undefined;
    
    		// Try identifier first (most specific)
    		if (normalizedIdentifier) {
    			chosen = candidates.find(tech => tech.identifier?.toLowerCase() === normalizedIdentifier);
    		}
    
    		// Try exact name match (case-insensitive)
    		if (!chosen && normalizedName) {
    			chosen = candidates.find(tech => tech.title?.toLowerCase() === normalizedName);
    		}
    
    		// Try fuzzy match on name only if we have a name
    		if (!chosen && normalizedName) {
    			const scored = candidates
    				.map(tech => ({tech, score: fuzzyScore(tech.title, name)}))
    				.sort((a, b) => a.score - b.score);
    			// Only use fuzzy match if it's reasonably good (score < 3)
    			if (scored[0] && scored[0].score < 3) {
    				chosen = scored[0].tech;
    			}
    		}
    
    		if (!chosen) {
    			const searchTerm = normalizedName ?? normalizedIdentifier ?? '';
    			const suggestions = candidates
    				.filter(tech => tech.title?.toLowerCase().includes(searchTerm))
    				.slice(0, 5)
    				.map(tech => `• ${tech.title} — \`choose_technology "${tech.title}"\``);
    
    			const lines = [
    				header(1, '❌ Technology Not Found'),
    				`Could not resolve "${name ?? identifier ?? 'unknown'}".`,
    				'',
    				header(2, 'Suggestions'),
    				...(suggestions.length > 0
    					? suggestions
    					: ['• Use `discover_technologies { "query": "keyword" }` to find candidates']),
    			];
    
    			return {
    				content: [{text: lines.join('\n'), type: 'text'}],
    			};
    		}
    
    		ensureFramework(chosen);
    		state.setActiveTechnology(chosen);
    		state.clearActiveFrameworkData();
    
    		const lines = [
    			header(1, '✅ Technology Selected'),
    			'',
    			bold('Name', chosen.title),
    			bold('Identifier', chosen.identifier ?? 'Unknown'),
    			'',
    			header(2, 'Next actions'),
    			'• `search_symbols { "query": "keyword" }` — fuzzy search within this framework',
    			'• `get_documentation { "path": "SymbolName" }` — open a symbol page',
    			'• `discover_technologies` — pick another framework',
    		];
    
    		return {
    			content: [{text: lines.join('\n'), type: 'text'}],
    		};
    	};
  • Input schema for 'choose_technology' tool defining optional 'identifier' and 'name' parameters.
    inputSchema: {
    	type: 'object',
    	required: [],
    	properties: {
    		identifier: {
    			type: 'string',
    			description: 'Optional technology identifier (e.g. doc://.../SwiftUI)',
    		},
    		name: {
    			type: 'string',
    			description: 'Technology name/title (e.g. SwiftUI)',
    		},
    	},
    },
  • Tool definition object registering 'choose_technology' with name, description, input schema, and handler reference.
    {
    	name: 'choose_technology',
    	description: 'Select the framework/technology to scope all subsequent searches and documentation lookups',
    	inputSchema: {
    		type: 'object',
    		required: [],
    		properties: {
    			identifier: {
    				type: 'string',
    				description: 'Optional technology identifier (e.g. doc://.../SwiftUI)',
    			},
    			name: {
    				type: 'string',
    				description: 'Technology name/title (e.g. SwiftUI)',
    			},
    		},
    	},
    	handler: buildChooseTechnologyHandler(context),
    },
  • Top-level call to register all tools, including 'choose_technology', to the MCP Server instance.
    registerTools(server, {client, state});
  • Fuzzy matching utility function used by the handler to score and select technology names.
    const fuzzyScore = (a: string | undefined, b: string | undefined): number => {
    	if (!a || !b) {
    		return Number.POSITIVE_INFINITY;
    	}
    
    	const lowerA = a.toLowerCase();
    	const lowerB = b.toLowerCase();
    	if (lowerA === lowerB) {
    		return 0;
    	}
    
    	if (lowerA.startsWith(lowerB) || lowerB.startsWith(lowerA)) {
    		return 1;
    	}
    
    	if (lowerA.includes(lowerB) || lowerB.includes(lowerA)) {
    		return 2;
    	}
    
    	return 3;
    };
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 of behavioral disclosure. It mentions that selecting a technology 'scope[s] all subsequent searches and documentation lookups,' which implies a stateful or persistent effect, but doesn't detail how this scoping works (e.g., is it session-wide, does it affect all sibling tools, are there limitations or side effects). For a tool with potential global impact and no annotation coverage, this is a significant gap in transparency.

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 clearly states the tool's purpose and effect. It is front-loaded with the core action ('Select the framework/technology') and avoids unnecessary details, making it easy to understand quickly. Every word earns its place by contributing to clarity.

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's complexity (stateful scoping with potential global effects), no annotations, no output schema, and high schema coverage, the description is minimally adequate. It explains the purpose but lacks details on behavior, return values, or integration with sibling tools. For a tool that sets context for subsequent operations, more completeness would be beneficial to guide the agent effectively.

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 input schema has 100% description coverage, with both parameters ('identifier' and 'name') documented in the schema. The description doesn't add any meaning beyond what the schema provides, such as explaining the relationship between 'identifier' and 'name' or providing examples of valid inputs. Since schema coverage is high, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 tool's purpose: 'Select the framework/technology to scope all subsequent searches and documentation lookups.' It specifies a verb ('Select') and resource ('framework/technology'), and explains the downstream effect ('scope all subsequent searches and documentation lookups'). However, it doesn't explicitly differentiate from siblings like 'current_technology' or 'discover_technologies', which could clarify its unique role.

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 when to use this tool by stating it 'scope[s] all subsequent searches and documentation lookups,' suggesting it should be used to set a context for future operations. However, it doesn't provide explicit guidance on when to use it versus alternatives like 'current_technology' (which might retrieve the current setting) or 'discover_technologies' (which might list options), nor does it mention any exclusions or prerequisites.

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/MightyDillah/apple-doc-mcp'

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