{"at":"2026-11-22T23:45:52.592Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-22T23:45:53.055Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-22T23:45:53.156Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-22T23:45:53.601Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"completions":{},"prompts":{"listChanged":true},"tools":{"listChanged":true}},"protocolVersion":"2025-06-18","serverInfo":{"name":"osm-tagging-schema","title":"OpenStreetMap Tagging Schema","version":"3.0.1","websiteUrl":"https://github.com/gander-tools/osm-tagging-schema-mcp"}}}}
{"at":"2026-11-22T23:45:53.601Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-22T23:45:53.601Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-22T23:45:53.604Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"**INPUT CONVERTER**: Convert OpenStreetMap tags from human-friendly flat text format (one key=value pair per line) into JSON object format required by other MCP tools. This is a preprocessing tool - use it FIRST when users provide tags as text before passing the result to validation, search, or analysis tools. All other tools in this MCP server expect JSON input, so this converter is essential for text-based workflows. The parser is robust and flexible: it handles multiple line ending formats (LF/CRLF/CR), supports comments (lines starting with #), ignores empty lines, trims whitespace, and correctly handles equals signs within values. Returns a validated JSON object with all tags, or an error if any tag is malformed or has an empty value.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"tags":{"description":"OpenStreetMap tags in flat text format with one key=value pair per line. Each line should contain exactly one tag in the format \"key=value\". Supports comment lines (starting with #) which are ignored, empty lines (skipped), and various line endings (LF, CRLF, CR). If a value contains an equals sign, only the first = is treated as the separator. Example: \"amenity=restaurant\\nname=Test Cafe\\ncuisine=italian\\n# This is a comment\\nopening_hours=Mo-Su 10:00-22:00\". All keys and values are trimmed of whitespace. Empty values will cause an error.","type":"string"}},"required":["tags"],"type":"object"},"name":"flat_to_json"},{"description":"Retrieve comprehensive details for a specific OpenStreetMap preset, including all tags, geometry constraints, and field definitions. A preset represents a complete feature template with its standard tags, allowed geometry types, required fields, and optional fields. Returns the preset's localized name, complete tag set with human-readable names, geometry types (point/line/area/etc.), and expanded field lists. Field lists are automatically expanded from template references (like {@templates/contact} becomes email, phone, website, fax) and preset inheritance (like {building} expands to include all building fields). Use this to understand the complete structure of a feature type, learn what tags and fields are expected for a feature, or build forms/UIs for OSM data entry. Accepts three flexible input formats for maximum convenience.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"presetId":{"anyOf":[{"type":"string"},{"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"},"type":"object"}],"description":"Identifier for the preset to retrieve, in one of three formats: 1) Preset ID using slash notation (e.g., 'amenity/restaurant', 'highway/residential', 'natural/tree') - this is the direct preset identifier. 2) Tag notation using equals sign (e.g., 'amenity=restaurant', 'building=house') - the tool will find the matching preset. 3) Tags object with key-value pairs (e.g., {\"amenity\": \"restaurant\", \"cuisine\": \"italian\"}) - finds the best matching preset based on all provided tags. The tool will find exact matches when possible or return the most specific preset that matches the given tags."}},"required":["presetId"],"type":"object"},"name":"get_preset_details"},{"description":"Retrieve all possible values for a specific OpenStreetMap tag key, with localized human-readable names for both the key and each value. This tool searches through the OSM tagging schema (both predefined field options and preset definitions) to find every documented value that can be used with the specified key. Returns four pieces of information: the normalized key name, localized key display name, a simple array of all values, and a detailed array with localized names for each value. Use this to discover what values are available for a tag (e.g., all amenity types), learn the proper terminology for values, or build UI selection lists. Essential for understanding OSM's controlled vocabularies.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"tagKey":{"description":"The OpenStreetMap tag key to retrieve values for (e.g., 'amenity', 'building', 'highway', 'natural', 'shop'). Supports both simple keys and namespaced keys with colons (e.g., 'addr:street', 'name:en'). The tool will search both field definitions and preset tags to find all documented values. Case-sensitive, use lowercase for standard OSM keys.","type":"string"}},"required":["tagKey"],"type":"object"},"name":"get_tag_values"},{"description":"**OUTPUT CONVERTER**: Convert OpenStreetMap tags from JSON object format into human-friendly flat text format (one key=value pair per line). This is a postprocessing tool - use it LAST when users want tags displayed as readable text rather than JSON. Since all other tools in this MCP server return JSON format, this converter is essential for creating user-friendly output, generating text files for external tools, or producing easily readable tag lists. The converter validates the input thoroughly: ensures all values are strings (not numbers or other types), rejects empty values, trims whitespace from keys and values, and produces clean one-tag-per-line output with newline separators. Returns plain text with each tag on a separate line, or an error if validation fails.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"tags":{"anyOf":[{"type":"string"},{"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"},"type":"object"}],"description":"OpenStreetMap tags in JSON format, provided as either: 1) A JSON string that will be parsed (e.g., '{\"amenity\":\"restaurant\",\"name\":\"Test Cafe\",\"cuisine\":\"italian\"}') - must be valid JSON with string values only, or 2) A direct JSON object with string key-value pairs (e.g., {\"amenity\": \"restaurant\", \"name\": \"Test\"}). All values must be strings; numbers, booleans, or other types will cause an error. Empty string values are not allowed. Keys and values will be trimmed of whitespace. Output format: one tag per line as \"key=value\"."}},"required":["tags"],"type":"object"},"name":"json_to_flat"},{"description":"Search for OpenStreetMap presets by keyword or tag combination. OSM presets are predefined feature templates that define common feature types (like 'restaurant', 'park', 'road') with their standard tags, geometry constraints, and recommended fields. This tool searches through preset IDs and their associated tags to find matching features. Supports two search modes: keyword search (searches in preset IDs and all tag keys/values) and tag-based search (exact matching on specific tag key-value pairs using 'key=value' format). Returns comprehensive preset information including localized names, complete tag sets with human-readable names, and allowed geometry types. Use this to discover what feature types exist, find the correct preset for a feature you want to map, or explore related feature categories. Optionally filter results by geometry type or limit result count for performance.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"geometry":{"description":"Filter results to only presets that support a specific geometry type (optional). Valid values: 'point' (nodes/POIs), 'vertex' (nodes along ways), 'line' (open ways like roads/rivers), 'area' (closed ways/areas like buildings/parks), 'relation' (complex features). Example: geometry='area' returns only presets that can be applied to area features.","enum":["point","vertex","line","area","relation"],"type":"string"},"keyword":{"description":"Search term for finding presets (case-insensitive). Two formats supported: 1) Simple keyword (e.g., 'restaurant', 'parking', 'school') - searches within preset IDs and all tag keys/values, matching partial strings. 2) Tag pair format (e.g., 'amenity=restaurant', 'highway=residential') - performs exact matching on the specified tag key and value. Examples: 'cafe' finds amenity/cafe and cuisine=cafe, while 'amenity=cafe' finds only presets with exactly amenity=cafe.","type":"string"},"limit":{"description":"Maximum number of preset results to return (optional, no default limit). Use this to get faster responses when you only need a few results, or to avoid overwhelming output when searching broad terms. Example: limit=10 returns only the first 10 matches.","type":"number"}},"required":["keyword"],"type":"object"},"name":"search_presets"},{"description":"Search for OpenStreetMap tags by keyword in both tag keys and tag values. Returns two categories of results: keyMatches (when the keyword matches a tag key, returns that key with all possible values) and valueMatches (when the keyword matches a specific tag value, returns the key-value pair). Searches are case-insensitive and match partial strings. Use this to explore available tags or find tags related to a concept.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"keyword":{"description":"Single keyword to search for in tag keys and values (case-insensitive). Should be a standalone word or partial word, not a tag pair. Examples: 'restaurant' (finds amenity=restaurant), 'wheel' (finds wheelchair, wheelchair:description), 'park' (finds leisure=park, amenity=parking, park_ride, etc.). For searching by complete tag pairs, use search_presets instead.","type":"string"},"limit":{"description":"Maximum total number of results to return across both keyMatches and valueMatches combined (default: 100). Use lower values for faster responses when you only need a few results.","type":"number"}},"required":["keyword"],"type":"object"},"name":"search_tags"},{"description":"Analyze an OpenStreetMap tag collection and suggest improvements to make it more complete and informative. This tool identifies which OSM presets match your tags, then suggests missing fields that would enhance the feature's documentation. Returns structured suggestions categorized by operation type (add, remove, update) with human-readable explanations. Suggestions include both required fields (core attributes for the matched preset) and optional fields (additional details that would be helpful). Each suggestion includes localized field names and explains why the field would improve the data. Use this for improving incomplete OSM data, learning what additional tags are recommended for a feature type, or ensuring comprehensive tagging before data upload. Accepts input in three flexible formats: JSON object, JSON string, or flat text format (key=value per line).","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"tags":{"anyOf":[{"type":"string"},{"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"},"type":"object"}],"description":"Collection of existing OpenStreetMap tags to analyze in one of three formats: 1) JSON object (e.g., {\"amenity\": \"restaurant\", \"name\": \"Test Cafe\"}), 2) JSON string (e.g., '{\"amenity\":\"parking\"}'), or 3) flat text format with one tag per line (e.g., \"amenity=restaurant\\nname=Test\"). The tool will identify matching presets and suggest additional fields that would make this feature more complete. Minimum one tag required."}},"required":["tags"],"type":"object"},"name":"suggest_improvements"},{"description":"Validate a single OpenStreetMap tag key-value pair against the OSM tagging schema. Performs comprehensive validation including: deprecation checking (identifies deprecated tags and suggests modern replacements), schema existence validation (verifies the tag key exists in the schema), option validation (checks if the value is in predefined options for that key), and field type checking (distinguishes between strict fields and combo fields that allow custom values). Returns detailed validation results with localized names and actionable messages. Use this for educational purposes, data quality checks, or validating individual tags before bulk operations.","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"key":{"description":"The OpenStreetMap tag key to validate (e.g., 'amenity', 'building', 'highway', 'natural'). Tag keys should use the standard OSM format with colons for namespaces (e.g., 'addr:street', 'name:en'). Case-sensitive.","type":"string"},"value":{"description":"The OpenStreetMap tag value to validate against the specified key (e.g., 'restaurant', 'yes', 'residential', 'park'). Values are checked against predefined options if the field has them. Case-sensitive in most cases, though some fields may accept case-insensitive values.","type":"string"}},"required":["key","value"],"type":"object"},"name":"validate_tag"},{"description":"Validate a complete collection of OpenStreetMap tags together, performing comprehensive validation on each tag and providing aggregated statistics. This tool validates each tag individually (using the same validation logic as validate_tag) and then aggregates the results to give you an overall picture of the collection's quality. Returns detailed validation results for each tag (including deprecation warnings, schema validation, and option checking) plus summary statistics (total valid count, deprecated count, error count). Use this for bulk validation of OSM data exports, quality assurance of tag collections before upload, or analyzing the completeness of feature tagging. Accepts input in three flexible formats: JSON object, JSON string, or flat text format (key=value per line).","inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"tags":{"anyOf":[{"type":"string"},{"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"},"type":"object"}],"description":"Collection of OpenStreetMap tags in one of three formats: 1) JSON object (e.g., {\"amenity\": \"restaurant\", \"name\": \"Test Cafe\", \"cuisine\": \"italian\"}), 2) JSON string (e.g., '{\"amenity\":\"parking\"}'), or 3) flat text format with one tag per line (e.g., \"amenity=restaurant\\nname=Test\\ncuisine=italian\"). The flat text format supports comments (lines starting with #) and empty lines. All formats are automatically parsed and validated."}},"required":["tags"],"type":"object"},"name":"validate_tag_collection"}]}}}
