This is NOT an MCP server. The codebase is a Next.js chat application (claude-app) with AI SDK integration, not an MCP server implementation. The repository contains a single tool definition file (lib/ai/tools/places-text-search.ts) that is part of a client-side chat application, not an MCP protocol implementation. No MCP server framework, no MCP protocol handling, no tool registration via MCP standards, and no transport layer (HTTP, SSE, or STDIO) for MCP communication. The tool definition is embedded in a Next.js app and uses the Vercel AI SDK, not the MCP protocol. This fundamentally misclassifies the project as an MCP server.
Tools (1)
placesTextSearchread onlyauth50/100
Search for places using text query via Google Places API
Tool description is minimal (64 chars) and lacks actionable context: does not state when to use this tool vs alternatives, what permissions are required, what the API rate limits are, or what format the query must follow
Input schema is incomplete: the 'query' parameter lacks constraints. No minimum/maximum length, no enum values, no guidance on supported query formats (business name, address, coordinates). LLMs will guess at valid formats.
Output schema is not documented in the source code provided. The tool definition shows only input; there is no visible schema for what fields are returned (place_id, name, location, rating, opening_hours, etc.). LLMs cannot plan downstream calls without knowing output structure.
Recommendations
CRITICAL: This repository is NOT an MCP server. It is a Next.js chat application using the Vercel AI SDK. To become a true MCP server, you must: (1) use the MCP TypeScript SDK (@modelcontextprotocol/sdk); (2) implement a server that exposes tools via the MCP protocol (HTTP+SSE or STDIO); (3) properly register tools with the MCP server using the Server class and addTool() method; (4) handle MCP requests and responses according to the 2026-07-28 spec.
Expand tool description from 64 chars to 100-200 chars, explicitly stating: (a) what the tool does ('Searches for places near the user's location using Google Places API'), (b) when to use it ('Call this when the user asks to find restaurants, hotels, parks, or other points of interest by name or type'), (c) prerequisites ('Requires user location or a specific address as input'), (d) rate limits ('Limited to 25 requests/second per API key').
Add parameter constraints: (a) 'query', min 1, max 255 characters; alphanumeric, hyphens, spaces only; no special symbols; (b) optional 'location', lat/long format 'lat,lng' or place name; (c) optional 'radius_meters', integer 0-50000, default 5000; (d) optional 'limit', integer 1-20, default 5.
Document the output schema with all fields returned by Google Places API: place_id (string, unique identifier), name (string), address (string), coordinates (lat: number, lng: number), rating (number 0-5, nullable), review_count (integer), opening_hours (object with is_open boolean, periods array), place_types (array of strings like 'restaurant', 'hotel'), website (string, nullable), phone (string, nullable). Include example response.
No error handling guidance. If the query is empty, the API key is missing, rate limits are hit, or no results match, what error is returned? How should the LLM recover? No documentation visible.
No pagination support documented. Google Places API returns multiple results, does the tool support limit/page_size parameters? If results are capped, at what number? How does the LLM retrieve additional results?
No dependency documentation. If this tool is called before a user has authenticated to Google Places, what happens? Does authentication happen server-side, or must the LLM request user permission first? Undocumented dependencies cause silent failures.
No tool composition or chaining documented. After calling placesTextSearch, what tools can the LLM call next? Does the response include place_id, coordinates, or other references that downstream tools (e.g., get_place_details, get_reviews) accept? Without documented chaining, multi-step workflows fail.
placesTextSearch
Add error handling guidance: (1) 'zero_results', no places match the query; suggest refining the query or expanding the search radius; (2) 'invalid_query', query contains invalid characters; provide the constraint list; (3) 'rate_limit_exceeded', too many requests; this is retryable, suggest backing off; (4) 'api_key_missing', authentication failed; verify server-side configuration; (5) 'invalid_location', coordinates out of range; provide valid range [-90 to 90 lat, -180 to 180 lng].
Add pagination parameters: 'limit' (1-20, default 5) and 'next_page_token' (string, optional). Document that results are sorted by relevance. If more than 'limit' results exist, include 'has_more: true' and 'next_page_token' in response. Add note: 'Call again with next_page_token to retrieve additional results.'
Add 'location' and optional 'radius_meters' parameters to make the tool more flexible. Current query-only design forces geographic ambiguity (which 'Main Street Pizza' if there are 50 across the country?). Accepting location improves accuracy.
Document composition with hypothetical downstream tools: 'After calling this tool, you can: (1) Call get_place_details(place_id) to fetch detailed info including reviews and photos; (2) Call get_place_directions(place_id) to get walking/driving directions; (3) Call make_reservation(place_id) if supported by the venue.' This guides multi-step workflows.
Add security note: 'This tool requires a valid Google Places API key configured server-side. User input (query, location) is sanitized to prevent injection attacks. Results are limited to 20 places per call to prevent token exhaustion. Rate limit: 25 requests/second per API key.'