{"serverInfo":{"name":"ServiceContext","version":"0.1","description":"Context-aware semantic search and AI assistance platform","author":"Daniel Aagren Seehartrai Madsen","authorWebsite":"https://www.danielmadsen.dk","note":"Alpha version - semantic search across documentation, best practices, and expert knowledge. Planned beta release in Q1 2026."},"capabilities":{"tools":12,"prompts":10},"tools":[{"name":"search","description":"Search ServiceNow documentation using semantic similarity with advanced filtering.\n\n**CRITICAL DECISION RULE**:\n- BROAD exploration (with or without API filtering) → Use scripting_search()\n- METHOD-SPECIFIC details → Use Discovery Track (scripting_list_methods first)\n\n**When to use this tool**:\n- Broad questions: \"How do I create records in ServiceNow?\"\n- API-specific exploration: \"Show me GlideRecord methods\" + api=\"GlideRecord\"\n- Cross-API discovery: \"What API handles email notifications?\"\n\n**API Filtering**:\n- Use api=\"GlideRecord\" to filter results to only GlideRecord methods\n- Maintains semantic search benefits (relevance scoring, fuzzy matching)\n\n**Query Construction**:\n- Use 5-15 word descriptive sentences (recommended for exploration)\n- OR use specific keywords/technical terms (recommended for precision)\n- Both approaches work effectively: \"how to query records\" OR \"glidesystem getusername\"\n- Avoid keyword soup and short queries (< 3 chars invalid)\n- One topic per search\n\nArgs:\n    query: Keyword-focused search query (e.g., \"query records\", \"insert method\")\n    api: Filter by API name (optional, e.g., \"GlideRecord\", \"GlideAjax\")\n    section: Filter by section type (optional): \"method_description\", \"parameter\", \"returns\", \"example\", \"object\"\n    scope: Filter by scope (optional): \"Global\" or \"Scoped\"\n    release: Filter by ServiceNow release (optional, e.g., \"Zurich\")\n    limit: Maximum number of results (default: 5, max: 20)\n\nReturns:\n    List of SearchResult objects with documentation content, metadata, and similarity scores\n\nExamples:\n    scripting_search(\"query records\", api=\"GlideRecord\")\n    scripting_search(\"error handling methods\", api=\"GlideSystem\")\n    scripting_search(\"workflow automation\")","inputSchema":null},{"name":"get_document","description":"Retrieve a specific ServiceNow documentation entry by ID.\n\nUse after scripting_search() to get full content of a specific result.\n\nArgs:\n    doc_id: The document identifier (integer) from scripting_search results\n\nReturns:\n    Full document data including all metadata and content\n\nRaises:\n    ToolError: If document is not found or database query fails","inputSchema":null},{"name":"list_methods","description":"PRIMARY DISCOVERY TOOL - Retrieve all available methods for a ServiceNow API.\n\n**MUST call this FIRST** when user mentions a specific API name and wants method details.\nThis is the mandatory first step of the Discovery Track.\n\n**When to use**:\n- User asks: \"What methods does GlideRecord have?\"\n- User asks: \"How does GlideRecord.insert() work?\"\n- User wants examples/parameters/returns of a method\n\n**When NOT to use**:\n- Broad questions without specific API → Use scripting_search()\n- Cross-API exploration → Use scripting_search()\n\n**Workflow**:\n1. scripting_list_methods(api=\"GlideRecord\") ← MUST DO THIS FIRST\n2. Then use: scripting_get_examples(), scripting_get_parameters(), or scripting_get_returns()\n\nArgs:\n    api: ServiceNow API name (e.g., \"GlideRecord\", \"GlideAjax\")\n\nReturns:\n    List of method descriptions with names, documentation, and metadata\n\nExamples:\n    scripting_list_methods(api=\"GlideRecord\")\n    scripting_list_methods(api=\"GlideAjax\")","inputSchema":null},{"name":"get_examples","description":"Retrieve code examples for a specific ServiceNow API and method.\n\n**MUST call scripting_list_methods FIRST** to verify API and method exist.\n\n**When to use**:\n- User asks: \"Show me an example of how to use GlideRecord.insert()\"\n- Need working code snippets for API usage\n\n**Workflow**:\n1. scripting_list_methods(api=\"GlideRecord\") ← MUST DO THIS FIRST\n2. scripting_get_examples(api=\"GlideRecord\", method_name=\"insert\")\n\nArgs:\n    api: ServiceNow API name (e.g., \"GlideRecord\", \"GlideAjax\")\n    method_name: Method name (e.g., \"insert\", \"update\", \"query\")\n\nReturns:\n    List of example documents with code snippets and metadata\n\nExamples:\n    scripting_get_examples(api=\"GlideRecord\", method_name=\"insert\")\n    scripting_get_examples(api=\"GlideAjax\", method_name=\"getXML\")","inputSchema":null},{"name":"get_returns","description":"Retrieve return value documentation for a specific ServiceNow API and method.\n\n**MUST call scripting_list_methods FIRST** to verify API and method exist.\n\n**When to use**:\n- User asks: \"What does the query() method return?\"\n- Need return type documentation for a method\n\n**Workflow**:\n1. scripting_list_methods(api=\"GlideRecord\") ← MUST DO THIS FIRST\n2. scripting_get_returns(api=\"GlideRecord\", method_name=\"query\")\n\nArgs:\n    api: ServiceNow API name (e.g., \"GlideRecord\", \"GlideAjax\")\n    method_name: Method name (e.g., \"insert\", \"update\", \"query\")\n\nReturns:\n    List of return value documents with type descriptions and metadata\n\nExamples:\n    scripting_get_returns(api=\"GlideRecord\", method_name=\"query\")\n    scripting_get_returns(api=\"GlideAjax\", method_name=\"getXML\")","inputSchema":null},{"name":"get_parameters","description":"Retrieve parameter documentation for a specific ServiceNow API and method.\n\n**MUST call scripting_list_methods FIRST** to verify API and method exist.\n\n**When to use**:\n- User asks: \"What parameters does the query() method accept?\"\n- Need parameter documentation for a method\n\n**Workflow**:\n1. scripting_list_methods(api=\"GlideRecord\") ← MUST DO THIS FIRST\n2. scripting_get_parameters(api=\"GlideRecord\", method_name=\"query\")\n\nArgs:\n    api: ServiceNow API name (e.g., \"GlideRecord\", \"GlideAjax\")\n    method_name: Method name (e.g., \"insert\", \"update\", \"query\")\n\nReturns:\n    List of parameter documents with parameter descriptions and metadata\n\nExamples:\n    scripting_get_parameters(api=\"GlideRecord\", method_name=\"query\")\n    scripting_get_parameters(api=\"GlideAjax\", method_name=\"getXML\")","inputSchema":null},{"name":"search_objects","description":"Search for ServiceNow Fluent API objects using semantic similarity.\n\nThis tool performs vector-based semantic search to find relevant fluent objects\nby matching the meaning of your query across available fluent object names.\n\n**CRITICAL DECISION RULE - Read this first**:\n\nYou MUST follow this rule:\n\nIF user asks a BROAD/CONCEPTUAL question about FLUENT objects WITHOUT knowing the object name:\n   - User: \"What fluent objects handle user data?\"\n   - User: \"Find configuration fluent objects\"\n   - USE THIS TOOL: fluent_search_objects()\n\nIF user mentions a SPECIFIC FLUENT OBJECT name:\n   - User: \"Show me properties of UserProfile fluent object\"\n   - User: \"What properties does ConfigurationSettings have?\"\n   - DO NOT USE THIS TOOL\n   - INSTEAD use DISCOVERY TRACK (see fluent_list_properties)\n\n**When to use this tool**:\n- Broad questions about fluent objects: \"What objects handle workflow?\"\n- Unknown fluent object: \"What object manages notifications?\"\n- Conceptual/exploratory queries: \"ServiceNow configuration objects\"\n- Discovering available fluent objects\n\n**When NOT to use** (MUST use Discovery Track instead):\n- User mentions specific fluent object -> Use fluent_list_properties first\n- User asks about specific properties -> Use fluent_list_properties first\n\n**Query Construction**:\n- Use 5-15 word descriptive sentences (recommended for exploration)\n- OR use specific keywords/technical terms (recommended for precision)\n- Both approaches work effectively: \"how to work with user profiles\" OR \"UserProfile properties\"\n- Avoid keyword soup and short queries (< 3 chars invalid)\n- One topic per search\n\n**Workflow**:\n1. User asks broad question about fluent objects\n2. Convert question to keywords\n3. Call fluent_search_objects() with keyword query\n4. Optionally: Call fluent_get_document() for full document\n\nArgs:\n    query: Keyword-focused search query (e.g., \"user profile object\", \"workflow configuration\", \"notification settings\")\n           NOT a full question - transform questions into keywords for better semantic search results\n    limit: Maximum number of results (default: 5, max: 20)\n\nReturns:\n    List of FluentSearchResult objects with:\n    - id: Document ID\n    - fluent_object: ServiceNow fluent object name\n    - property_name: Property name (may be None for object-level results)\n    - section: Section type (property_datatype, property_description, etc.)\n    - content: Documentation content\n    - metadata: JSONB metadata including:\n        - url: Link to official ServiceNow documentation\n        - scopes: Array of supported scopes ([\"Global\"], [\"Scoped\"], or both)\n        - release: ServiceNow release (e.g., \"Zurich\")\n    - similarity: Relevance score (0-1, higher is more relevant)\n\nRaises:\n    ToolError: If input validation fails or search fails","inputSchema":null},{"name":"get_document","description":"Retrieve a specific ServiceNow Fluent API documentation entry by ID.\n\n**When to use**: After calling fluent_search_objects(), you get documents with IDs\nand similarity scores. Use this tool to fetch the full content of a specific result.\n\n**Use case**: User asks \"Tell me more about that last fluent object result\" or you want complete\ndocumentation for a document returned from fluent search.\n\n**Typical workflow**:\n1. Call fluent_search_objects(query, ...)  -> returns results with id field\n2. Call fluent_get_document(doc_id) -> get complete document including full content\n\nArgs:\n    doc_id: The document identifier (integer) from fluent_search_objects results\n\nReturns:\n    Full document data including all metadata, full content, and all documentation fields\n\nRaises:\n    ToolError: If document is not found or database query fails","inputSchema":null},{"name":"list_properties","description":"PRIMARY DISCOVERY TOOL - Retrieve all available properties for a ServiceNow Fluent API object.\n\n**CRITICAL - You MUST call this tool first when**:\n- User mentions a specific fluent object name (e.g., \"UserProfile\", \"ConfigurationSettings\")\n- User asks about properties of a fluent object (e.g., \"What properties does UserProfile have?\")\n- User asks about a specific property (e.g., \"How does email property work?\")\n- User wants examples/datatypes/required info of a property\n\nThis is the MANDATORY FIRST STEP of the Fluent Discovery Track. Do not skip this.\n\n**ONLY skip this tool if**:\n- User asks a broad/conceptual question about fluent objects WITHOUT mentioning a specific object\n- User explicitly requests semantic search across multiple fluent objects\n- You already recently called this tool for this fluent object\n\n**Why this tool is mandatory**:\n- Returns exact property names for follow-up tool calls\n- Verifies fluent object and property exist before requesting specific details\n- Avoids wasting tokens on semantic search when fluent object is known\n- Provides full property descriptions for context and understanding\n- Enables informed selection of which specific tool to call next\n\n**MANDATORY FLUENT DISCOVERY TRACK WORKFLOW**:\nUser asks: \"Show me UserProfile email property examples\"\n\nStep 1 (MANDATORY): fluent_list_properties(fluent_object=\"UserProfile\")\nStep 2: Review property descriptions, find \"email\" in results\nStep 3: fluent_get_property(fluent_object=\"UserProfile\", property_name=\"email\")\nStep 4 (optional): get_fluent_property_datatype(), get_fluent_property_examples(), etc.\n\n**Other common scenarios**:\nUser: \"What properties does ConfigurationSettings have?\"\n-> Just call fluent_list_properties(fluent_object=\"ConfigurationSettings\"), return results\n\nUser: \"How do I use the email property on UserProfile?\"\n-> Call fluent_list_properties(fluent_object=\"UserProfile\") first to verify it exists\n-> Then call fluent_get_property with exact property_name\n\nUser: \"How do I handle user data?\"\n-> This is BROAD, doesn't mention fluent object -> Use semantic search (fluent_search_objects)\n-> Do NOT use this tool\n\n**What to do with results**:\n- If user asked \"what properties does X have?\" -> Present the list with brief descriptions\n- If user asked about a specific property -> Find it in results, then call fluent_get_property\n- If property not found -> Tell user the property doesn't exist for this fluent object\n- If fluent object returns empty -> Fluent object name may be incorrect, suggest alternatives or check spelling\n\nArgs:\n    fluent_object: ServiceNow fluent object name (e.g., \"UserProfile\", \"ConfigurationSettings\", \"WorkflowConfig\")\n\nReturns:\n    List of property description documents with:\n    - id: Document ID\n    - fluent_object: ServiceNow fluent object name\n    - property_name: Property name\n    - section: Will always be \"property_description\"\n    - content: The property description documentation\n    - metadata: JSONB metadata including:\n        - url: Link to official ServiceNow documentation\n        - scopes: Array of supported scopes ([\"Global\"], [\"Scoped\"], or both)\n        - release: ServiceNow release (e.g., \"Zurich\", \"Vancouver\")\n\n    Empty list if no properties are found for the fluent object.\n\nRaises:\n    ToolError: If input validation fails or database query fails\n\nExamples:\n    # Get all property descriptions for UserProfile fluent object\n    fluent_list_properties(fluent_object=\"UserProfile\")\n\n    # Get all property descriptions for ConfigurationSettings fluent object\n    fluent_list_properties(fluent_object=\"ConfigurationSettings\")","inputSchema":null},{"name":"get_property","description":"Retrieve complete information for a specific ServiceNow Fluent API property.\n\n**Prerequisites** (you must have done this first):\nYou SHOULD have called fluent_list_properties(fluent_object=...) before calling this tool\nto verify the fluent object and property exist. This avoids wasting tokens on non-existent properties.\n\nONLY skip fluent_list_properties if:\n- User explicitly provided fluent_object+property_name combination in their question\n- You recently called fluent_list_properties for this fluent object\n\n**When to use**: Call this to get all available documentation for a specific fluent property.\nThis provides comprehensive information including datatype, description, examples, required status, and valid values.\n\n**Use cases**:\n- User asks: \"Tell me about the email property on UserProfile\"\n- You need complete documentation for implementing a fluent property\n- Getting all property details in one call\n\n**MANDATORY WORKFLOW** (when user asks about a property):\n1. fluent_list_properties(fluent_object=\"UserProfile\") <- MUST DO THIS FIRST\n2. Verify property exists in results\n3. fluent_get_property(fluent_object=\"UserProfile\", property_name=\"email\")\n4. (optional) Use specific getters for individual sections if needed\n\n**Response Format** (how to present results):\nWhen you get results from this tool:\n1. State what you found: \"Found complete documentation for UserProfile.email property\"\n2. Organize by section type: Group datatype, description, examples, etc.\n3. Present each section clearly with formatting\n4. Include metadata: Mention the official ServiceNow documentation URL\n\n**If no results found**:\n1. Check spelling of fluent_object and property_name\n2. Call fluent_list_properties(fluent_object=...) to see available properties\n3. The property may not have complete documentation\n\nArgs:\n    fluent_object: ServiceNow fluent object name (e.g., \"UserProfile\", \"ConfigurationSettings\")\n    property_name: Property name (e.g., \"email\", \"firstName\", \"isActive\")\n\nReturns:\n    List of all documentation sections for the property with:\n    - id: Document ID\n    - fluent_object: ServiceNow fluent object name\n    - property_name: Property name\n    - section: Section type (property_datatype, property_description, property_example, property_required, property_valid_values)\n    - content: The documentation content for that section\n    - metadata: JSONB metadata including:\n        - url: Link to official ServiceNow documentation\n        - scopes: Array of supported scopes ([\"Global\"], [\"Scoped\"], or both)\n        - release: ServiceNow release (e.g., \"Zurich\", \"Vancouver\")\n\n    Empty list if no documentation is found for the combination.\n\nRaises:\n    ToolError: If input validation fails or database query fails\n\nExamples:\n    # Get all documentation for UserProfile email property\n    fluent_get_property(fluent_object=\"UserProfile\", property_name=\"email\")\n\n    # Get all documentation for ConfigurationSettings timeout property\n    fluent_get_property(fluent_object=\"ConfigurationSettings\", property_name=\"timeout\")","inputSchema":null},{"name":"search","description":"Search for ServiceNow SDK documentation using semantic similarity.\n\nThis tool performs vector-based semantic search to find relevant SDK documentation\nby matching the meaning of your query across available SDK documentation.\n\n**When to use this tool**:\n- Broad questions about SDK functionality: \"What SDK objects handle data?\"\n- Unknown SDK object: \"What objects manage configuration?\"\n- Conceptual/exploratory queries: \"ServiceNow SDK objects\"\n- Discovering available SDK documentation\n\n**How to construct effective queries**:\nThis tool uses semantic search (matching meaning), not exact keyword matching.\n\nCRITICAL: The documentation is chunked with headers like \"SDK Object: Name\" or \"SDK Function: Name\".\nTo get a high similarity score (>0.80), your query must match the semantic density of a full documentation paragraph.\n\n**Query Construction Rules**:\n1. ONE TOPIC PER SEARCH: Do not combine multiple unrelated SDK objects in one query (e.g., do not search for \"DateTimeColumn and FormColumn\"). Perform separate searches for distinct concepts.\n2. NO KEYWORD SOUP: Avoid strings of nouns. Use descriptive, declarative sentences.\n3. TARGET THE HEADERS: Use phrases like \"SDK documentation for...\" or \"How to use the object...\" to align with the chunked data.\n\n**Query Construction Tips**:\n- BAD: \"DateTimeColumn FormColumn value property\" (Too many topics, keyword soup)\n- BAD: \"datetime value\" (Too short, low confidence)\n- GOOD: \"How to work with DateTime columns in ServiceNow SDK\"\n- GOOD: \"Documentation for the DateTimeColumn object and its properties\"\n- BEST: \"Usage examples and best practices for creating form columns with datetime fields\"\n\n**Best practices**:\n- Use for EXPLORATORY searches only.\n- **Phrase the query as a 5-15 word descriptive sentence.**\n- If you know the SDK object name, consider using more specific queries\n\n**Workflow**:\n1. User asks broad question about SDK functionality\n2. Convert question to keywords\n3. Call sdk_search() with keyword query\n\nArgs:\n    query: Keyword-focused search query (e.g., \"user profile object\", \"datetime column\", \"configuration settings\")\n           NOT a full question - transform questions into keywords for better semantic search results\n    match_threshold: Similarity threshold (0.0 to 1.0, default: 0.8)\n    limit: Maximum number of results (default: 10, max: 20)\n\nReturns:\n    List of matching SDK documents with similarity scores\n\nRaises:\n    ToolError: If input validation fails or search fails","inputSchema":null},{"name":"get_document","description":"Retrieve a specific ServiceNow SDK documentation entry by ID.\n\n**When to use**: After calling sdk_search(), you get documents with IDs\nand similarity scores. Use this tool to fetch the full content of a specific result.\n\n**Use case**: User asks \"Tell me more about that last result\" or you want complete\ndocumentation for a document returned from search.\n\n**Typical workflow**:\n1. Call sdk_search(query, ...)  -> returns results with id field\n2. Call sdk_get_document(doc_id) -> get complete document including full content\n\nArgs:\n    doc_id: The document identifier (integer) from sdk_search results\n\nReturns:\n    Full document data including all metadata, full content, and all documentation fields\n\nRaises:\n    ToolError: If document is not found or database query fails","inputSchema":null}],"prompts":[{"name":"servicenow-developer","description":"General ServiceNow development assistant","arguments":[{"name":"focus","description":null,"required":true}]},{"name":"servicenow-script-include-builder","description":"Script Include development assistant","arguments":[]},{"name":"servicenow-business-rule-creator","description":"Business Rule development assistant","arguments":[]},{"name":"servicenow-client-script-writer","description":"Client-side scripting assistant","arguments":[]},{"name":"servicenow-code-reviewer","description":"Code review assistant","arguments":[{"name":"code","description":"Provide as a JSON string matching the following schema: {\"anyOf\":[{\"type\":\"string\"},{\"type\":\"null\"}]}","required":true}]},{"name":"servicenow-incident-management","description":"Incident management and automation specialist","arguments":[]},{"name":"servicenow-change-management","description":"Change management and CAB automation specialist","arguments":[]},{"name":"servicenow-cmdb-expert","description":"Configuration Management Database specialist","arguments":[]},{"name":"servicenow-debugging-assistant","description":"Debugging and troubleshooting specialist for ServiceNow","arguments":[]},{"name":"servicenow-performance-optimizer","description":"Performance optimization specialist for ServiceNow","arguments":[]}],"authentication":{"type":"API Key","required":"All requests require authentication","header_format":"Authorization: Bearer sc_your_api_key","key_format":"Keys start with 'sc_' prefix","storage":"Database-backed (PostgreSQL)","note":"API keys are validated against the api_keys table using SHA-256 hashing"},"endpoints":{"mcp_protocol":"/mcp","documentation":"/","health":"/health"},"usage":{"mcp_protocol_endpoint":"/mcp","transport":"Streamable HTTP","discovery":"MCP clients can discover and call tools via the MCP protocol","prompts":"Use prompts/list and prompts/get to access coding assistant prompts","note":"This endpoint (/) provides human-readable documentation. MCP clients should use /mcp"}}