From 0ecc88bc0cc3aae034aa5675fceeb5e8cdd9246c Mon Sep 17 00:00:00 2001 From: Jayachandu Bandlamudi Date: Thu, 23 Oct 2025 13:54:47 +0530 Subject: [PATCH 001/108] Integrated toolops test case generation with MCP CF. --- mcpgateway/main.py | 66 +++ mcpgateway/toolops/README.md | 12 + mcpgateway/toolops/__init__.py | 0 .../toolops/list_of_tools_from_mcp_cf.json | 545 ++++++++++++++++++ mcpgateway/toolops/services.py | 63 ++ mcpgateway/toolops/tool_format_conversion.py | 51 ++ 6 files changed, 737 insertions(+) create mode 100644 mcpgateway/toolops/README.md create mode 100644 mcpgateway/toolops/__init__.py create mode 100644 mcpgateway/toolops/list_of_tools_from_mcp_cf.json create mode 100644 mcpgateway/toolops/services.py create mode 100644 mcpgateway/toolops/tool_format_conversion.py diff --git a/mcpgateway/main.py b/mcpgateway/main.py index d18170efe..c34516d24 100644 --- a/mcpgateway/main.py +++ b/mcpgateway/main.py @@ -948,6 +948,7 @@ async def _call_streamable_http(self, scope, receive, send): # Create API routers protocol_router = APIRouter(prefix="/protocol", tags=["Protocol"]) tool_router = APIRouter(prefix="/tools", tags=["Tools"]) +toolops_router = APIRouter(prefix="/toolops", tags=["Toolops"]) resource_router = APIRouter(prefix="/resources", tags=["Resources"]) prompt_router = APIRouter(prefix="/prompts", tags=["Prompts"]) gateway_router = APIRouter(prefix="/gateways", tags=["Gateways"]) @@ -1204,6 +1205,70 @@ def update_url_protocol(request: Request) -> str: return str(urlunparse(new_parsed)).rstrip("/") +from mcpgateway.toolops.services import validation_generate_test_cases +# Toolops APIs - Generating test cases , Tool enrichment # +@toolops_router.post("/validation/generate_testcases") +async def generate_testcases_for_tool(tool_id: str = Query(description="Tool ID",default='e228725d951f4877bcb80418e7a6f139')) -> List[Dict]: + """ + Generate test cases for a tool + + This endpoint handles the automated test case generation for a tool by accepting + a tool id . The `require_auth` dependency ensures that + the user is authenticated before proceeding. + + Args: + tool_id: Tool ID in context forge. + user (str): The authenticated user (from `require_auth` dependency). + + Returns: + List: A list of test cases generated for the tool + + Raises: + HTTPException: If the request body contains invalid JSON, a 400 Bad Request error is raised. + """ + try: + print("Running test case geneation for Tool - ", tool_id) + #logger.debug(f"Authenticated user {user} is initializing the protocol.") + test_cases = await validation_generate_test_cases(tool_id) + return test_cases + + except json.JSONDecodeError: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail="Invalid JSON in request body", + ) + +@toolops_router.post("/enrichment/enrich_tool") +async def enrich_a_tool(tool_id: str = Query(None, description="Tool ID")) -> Dict: + """ + Generate test cases for a tool + + This endpoint handles the automated tool enrichment by accepting + a tool id . The `require_auth` dependency ensures that + the user is authenticated before proceeding. + + Args: + tool_id: Tool ID in context forge. + user (str): The authenticated user (from `require_auth` dependency). + + Returns: + List: A list of test cases generated for the tool + + Raises: + HTTPException: If the request body contains invalid JSON, a 400 Bad Request error is raised. + """ + try: + print("Tool - ", tool_id) + #logger.debug(f"Authenticated user {user} is initializing the protocol.") + return {"enriched_tool":{"name":"test"}} + + except json.JSONDecodeError: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail="Invalid JSON in request body", + ) + + # Protocol APIs # @protocol_router.post("/initialize") async def initialize(request: Request, user=Depends(get_current_user)) -> InitializeResult: @@ -4332,6 +4397,7 @@ async def cleanup_import_statuses(max_age_hours: int = 24, user=Depends(get_curr app.include_router(version_router) app.include_router(protocol_router) app.include_router(tool_router) +app.include_router(toolops_router) app.include_router(resource_router) app.include_router(prompt_router) app.include_router(gateway_router) diff --git a/mcpgateway/toolops/README.md b/mcpgateway/toolops/README.md new file mode 100644 index 000000000..8464178d9 --- /dev/null +++ b/mcpgateway/toolops/README.md @@ -0,0 +1,12 @@ +### Setup toolops SDK in MCP context forge environment +* `git clone git@github.ibm.com:research-toolops/toolops-sdk.git` clone toolops SDK repo +* Now install toolops SDK using `pip install .` (there are package version differences between MCP-CF and ToolOps , fix is required for the PR) +* Now set environment variables required for LLM configuration + ``` + export WATSONX_APIKEY=xxxxxxxxxxxxxxxxxxxxx + export WATSONX_PROJECT_ID=xxxxxxxxxxxxxxxxxx + ``` + +### Starting MCP context forge from git repo +* Install dependencies using `pip install .` +* `uvicorn mcpgateway.main:app --host 0.0.0.0 --port 4444 --workers 4` will start Context forge UI and APIs at http://localhost:4444/docs and toolops API endpoints will be shown. \ No newline at end of file diff --git a/mcpgateway/toolops/__init__.py b/mcpgateway/toolops/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mcpgateway/toolops/list_of_tools_from_mcp_cf.json b/mcpgateway/toolops/list_of_tools_from_mcp_cf.json new file mode 100644 index 000000000..f2ea8df29 --- /dev/null +++ b/mcpgateway/toolops/list_of_tools_from_mcp_cf.json @@ -0,0 +1,545 @@ +[ + { + "id": "01731d582ee148a39b0ff9b56bc26678", + "originalName": "getV2Actions", + "url": "http://localhost:9001/sse", + "description": "from Salesloft\n\n\n**Query Parameters:**\n\n- **ids**: the id's of actions\n\n- **step_id**: The ID of the step to retrieve. If not provided, all steps for the pipeline will be returned.\n\n- **type**: Filter actions by type. email, phone, integration etc.\n\n- **due_on[gt]**: Returns all matching records that are greater than the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **due_on[gte]**: Returns all matching records that are greater than or equal to the provided iso8601 timestamp. The date should be in iso8601 format.\n\n- **due_on[lt]**: Returns all matching records that are less than the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **due_on[lte]**: Returns all matching records that are less than or equal to the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **user_guid**: Filters actions by the user's guid. Multiple user guids can be applied.\n\n- **person_id**: retrieves the records by using person name.\n\n- **cadence_id**: The cadence id of the action\n\n- **multitouch_group_id**: The ID of the multitouch group to filter by. If not specified, all actions will be returned.\n\n- **updated_at[gt]**: Returns all matching records that are greater than the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **updated_at[gte]**: Returns all matching records that are greater than or equal to the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **updated_at[lt]**: Returns all matching records that are less than the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **updated_at[lte]**: Returns all matching records that are less than or equal to the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **sort_by**: The field to sort by. Defaults to created_at.\n\n- **sort_direction**: The direction to sort the results in. Can be either `asc` or `desc`.\n\n- **per_page**: How many records to show per page in the range [1, 100]. Defaults to 25\n\n- **page**: The current page to fetch results from. Defaults to 1.\n\n- **include_paging_counts**: Whether to include total_pages and total_count in the metadata. Defaults to false\n\n- **limit_paging_counts**: Specifies whether the max limit of 10k records should be applied to pagination counts. Affects the total_count and total_pages data.\n\n\n**Responses:**\n\n- **200** (Success): All actions were retrieved successfully.\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **data**: A list of objects containing the actions data from Salesloft\n\n - **Example:**\n```json\n{\n "data": [\n {\n "action_details": {\n "_href": "https://api.salesloft.com/v2/actions",\n "id": 18\n },\n "cadence": {\n "_href": "https://api.salesloft.com/v2/actions",\n "id": 18\n },\n "created_at": "2019-01-01T00:00:00Z"\n }\n ],\n "metadata": {\n "filtering": {\n "key": "value"\n },\n "paging": {\n "current_page": 1,\n "next_page": 1,\n "per_page": 10\n },\n "sorting": {\n "sort_by": "created_at",\n "sort_direction": "asc"\n }\n }\n}\n```\n\n- **401**: The HTTP response status code for unauthorized access. The default is 401.\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **errorCode**: The error code from Salesloft\n\n - **message**: The message to send to the user.\n\n - **Example:**\n```json\n{\n "errorCode": "ERR_BAD_REQUEST",\n "message": "Hello"\n}\n```\n\n- **404**: The HTTP response status code for a Not Found (404) error.\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **errorCode**: The error code from Salesloft\n\n - **message**: The message to send to the user.\n\n - **Example:**\n```json\n{\n "errorCode": "ERR_BAD_REQUEST",\n "message": "Hello"\n}\n```", + "requestType": "SSE", + "integrationType": "MCP", + "headers": null, + "inputSchema": { + "type": "object", + "properties": { + "ids": { + "type": "string", + "description": "Filter by action id", + "example": 18, + "x-ibm-examples": [ + 345687678, + 767763892 + ] + }, + "step_id": { + "title": "Step name", + "type": "string", + "description": "Filter actions by step name", + "x-ibm-category": "An-ID" + }, + "type": { + "title": "Type", + "type": "string", + "description": "Filter actions by type. Can be one of:email, phone,integration and other", + "example": "filter", + "x-ibm-enum-descriptions": [ + "phone", + "email", + "integration", + "other" + ], + "x-ibm-examples": [ + "email", + "phone" + ] + }, + "due_on[gt]": { + "title": "Due on after the date", + "type": "string", + "description": "Returns actions that are due on after the provided date", + "format": "date", + "x-ibm-category": "Date-Time" + }, + "due_on[gte]": { + "title": "Due on greater than or equal to date", + "type": "string", + "description": "Returns actions that are greater than or equal to the provided date", + "format": "date", + "example": "2018-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2018-02-01T00:00:00Z", + "2018-03-01T00:00:00Z" + ] + }, + "due_on[lt]": { + "title": "Due on before the date", + "type": "string", + "description": "Returns actions that are due on before the provided date", + "format": "date", + "example": "2018-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2018-01-02T00:00:00Z", + "2018-01-03T00:00:00Z" + ] + }, + "due_on[lte]": { + "title": "Due on less than or equal to date", + "type": "string", + "description": "Returns actions that are less than or equal to the provided date", + "format": "date", + "example": "2018-01-01T00:00:00Z", + "x-ibm-category": "Date-Time" + }, + "user_guid": { + "title": "User guid", + "type": "string", + "description": "Filters actions by the user's guid", + "example": "12345678-1234-1234-1234-123456789012", + "x-ibm-examples": [ + 12345678, + 12355668 + ] + }, + "person_id": { + "title": "Person name", + "type": "string", + "description": "Filter actions by person name", + "example": "123456", + "x-ibm-category": "An-ID", + "x-ibm-examples": [ + "319104110", + "345678993" + ] + }, + "cadence_id": { + "title": "Cadence name", + "type": "string", + "description": "Filter actions by cadence name", + "example": "123456789", + "x-ibm-category": "An-ID", + "x-ibm-examples": [ + "1030231", + "1034653" + ] + }, + "multitouch_group_id": { + "title": "Multitouch group id", + "type": "string", + "description": "Filter actions by multitouch group id", + "example": 987667893, + "x-ibm-examples": [ + 345696969, + 767088963 + ] + }, + "updated_at[gt]": { + "title": "Updated on after the date", + "type": "string", + "description": "Returns actions that are updated after the provided date", + "format": "date", + "example": "2017-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2018-01-01T00:00:00Z", + "2019-01-01T00:00:00Z" + ] + }, + "updated_at[gte]": { + "title": "Updated at greater than or equal to the date", + "type": "string", + "description": "Returns actions that are greater than the provided date", + "format": "date", + "example": "2017-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2018-01-01T00:00:00Z", + "2019-01-01T00:00:00Z" + ] + }, + "updated_at[lt]": { + "title": "Updated on before the date", + "type": "string", + "description": "Returns actions that are updated before the provided date", + "format": "date", + "example": "2017-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2017-01-01T00:00:00.123Z", + "2017-01-01T00:00:00.456Z" + ] + }, + "updated_at[lte]": { + "title": "Updated at less than or equal to the date", + "type": "string", + "description": "Returns actions that are less than or equal to the provided date", + "format": "date", + "example": "2017-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2017-01-01T00:00:00.123Z", + "2017-01-01T00:00:00.456Z" + ] + }, + "sort_by": { + "title": "Sort by", + "enum": [ + "updated_at", + "created_at" + ], + "type": "string", + "description": "Key to sort on, must be one of: created_at, updated_at. Defaults to updated_at", + "default": "updated_at", + "example": "updated_at", + "x-ibm-enum-descriptions": [ + "updated at", + "created at" + ], + "x-ibm-examples": [ + "created_at" + ] + }, + "sort_direction": { + "title": "Sort direction", + "enum": [ + "ASC", + "DESC" + ], + "type": "string", + "description": "Direction to sort in, must be one of: ASC, DESC. Defaults to DESC", + "default": "DESC", + "example": "ASC", + "x-ibm-enum-descriptions": [ + "ASC", + "DESC" + ], + "x-ibm-examples": [ + "DESC" + ] + }, + "per_page": { + "title": "Per page", + "maximum": 100, + "minimum": 1, + "type": "integer", + "description": "How many records to show per page in the range [1, 100]. Defaults to 25", + "default": 25, + "example": 1, + "x-ibm-examples": [ + 100, + 25 + ] + }, + "page": { + "title": "Page", + "type": "integer", + "default": 1, + "example": 1, + "x-ibm-examples": [ + 2, + 3 + ], + "description": "The current page to fetch results from. Defaults to 1." + }, + "include_paging_counts": { + "title": "Include paging counts", + "type": "boolean", + "default": false, + "example": true, + "x-ibm-enum-descriptions": [ + "True", + "False" + ], + "x-ibm-examples": [ + false + ], + "description": "Whether to include total_pages and total_count in the metadata. Defaults to false" + }, + "limit_paging_counts": { + "title": "Limit paging counts", + "type": "boolean", + "example": true, + "x-ibm-enum-descriptions": [ + "True", + "False" + ], + "x-ibm-examples": [ + false + ], + "description": "Specifies whether the max limit of 10k records should be applied to pagination counts. Affects the total_count and total_pages data." + } + }, + "required": [] + }, + "annotations": {}, + "jsonpathFilter": "", + "auth": null, + "createdAt": "2025-10-16T06:51:21.209380", + "updatedAt": "2025-10-16T06:51:21.209385", + "enabled": true, + "reachable": true, + "gatewayId": "26c7544731ae4326a53a9e698c4e7119", + "executionCount": 0, + "metrics": { + "totalExecutions": 0, + "successfulExecutions": 0, + "failedExecutions": 0, + "failureRate": 0, + "minResponseTime": null, + "maxResponseTime": null, + "avgResponseTime": null, + "lastExecutionTime": null + }, + "name": "salesloft-all-actions-getv2actions", + "displayName": "Getv2Actions", + "gatewaySlug": "salesloft-all-actions", + "customName": "getV2Actions", + "customNameSlug": "getv2actions", + "tags": [], + "createdBy": "admin@example.com", + "createdFromIp": "127.0.0.1", + "createdVia": "federation", + "createdUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36", + "modifiedBy": null, + "modifiedFromIp": null, + "modifiedVia": null, + "modifiedUserAgent": null, + "importBatchId": null, + "federationSource": "salesloft all actions", + "version": 1, + "teamId": "a9a443a1e1f24619819a088e24d05e0b", + "ownerEmail": "admin@example.com", + "visibility": "public" + }, + { + "id": "e228725d951f4877bcb80418e7a6f139", + "originalName": "postApiV2Tickets", + "url": "http://localhost:9002/sse", + "description": "in Freshservice\n\n\n**Responses:**\n\n- **201** (Success): OK\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n "ticket": {\n "cc_emails": [\n "unknown"\n ],\n "fwd_emails": [\n "unknown"\n ],\n "reply_cc_emails": [\n "unknown"\n ]\n }\n}\n```\n\n- **400**: Bad request\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n "description": "string",\n "errors": [\n {\n "field": "string",\n "message": "string",\n "code": "string"\n }\n ]\n}\n```\n\n- **403**: Forbidden\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n "code": "string",\n "message": "string"\n}\n```", + "requestType": "SSE", + "integrationType": "MCP", + "headers": null, + "inputSchema": { + "type": "object", + "properties": { + "email": { + "title": "Requester", + "type": "string", + "x-ibm-order": 1, + "x-ibm-multiline": "false", + "x-ibm-ui-extension": { + "component": "dropdown", + "actions": [ + { + "skill_id": "FreshService__1.0.0__getApiV2Requesters", + "mappings": { + "labels": "requesters.items.properties.primary_email", + "values": "requesters.items.properties.primary_email" + }, + "type": "data", + "params": {} + } + ] + } + }, + "subject": { + "title": "Subject", + "type": "string", + "x-ibm-order": 2, + "x-ibm-multiline": "false" + }, + "source": { + "title": "Source", + "maximum": 4, + "minimum": 1, + "type": "number", + "description": "Possible values : 1 - Email, 2 - Portal, 3 - Phone, 4 - Chat", + "x-ibm-order": 3, + "x-ibm-multiline": "false" + }, + "status": { + "title": "Status", + "maximum": 5, + "minimum": 2, + "type": "number", + "description": "Possible values: 2- Open,3- Pending,4 - Resolved , 5 - Closed ", + "default": 2, + "x-ibm-show": false, + "x-ibm-order": 4, + "x-ibm-multiline": "false" + }, + "priority": { + "title": "Priority", + "maximum": 4, + "minimum": 1, + "type": "number", + "description": "Possible value : 1 - Low,2 - Medium,3 - High,4 - Urgent", + "x-ibm-order": 5, + "x-ibm-multiline": "false" + }, + "description": { + "title": "Description", + "type": "string", + "x-ibm-order": 6, + "x-ibm-multiline": "true" + } + }, + "required": [ + "email", + "subject", + "status", + "priority", + "description" + ] + }, + "annotations": {}, + "jsonpathFilter": "", + "auth": null, + "createdAt": "2025-10-16T06:54:54.840856", + "updatedAt": "2025-10-16T06:54:54.840861", + "enabled": true, + "reachable": true, + "gatewayId": "23dba8b17f934e16a8988586c5d7aacb", + "executionCount": 0, + "metrics": { + "totalExecutions": 0, + "successfulExecutions": 0, + "failedExecutions": 0, + "failureRate": 0, + "minResponseTime": null, + "maxResponseTime": null, + "avgResponseTime": null, + "lastExecutionTime": null + }, + "name": "freshservice-create-ticket-postapiv2tickets", + "displayName": "Postapiv2Tickets", + "gatewaySlug": "freshservice-create-ticket", + "customName": "postApiV2Tickets", + "customNameSlug": "postapiv2tickets", + "tags": [], + "createdBy": "admin@example.com", + "createdFromIp": "127.0.0.1", + "createdVia": "federation", + "createdUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36", + "modifiedBy": null, + "modifiedFromIp": null, + "modifiedVia": null, + "modifiedUserAgent": null, + "importBatchId": null, + "federationSource": "Freshservice create ticket", + "version": 1, + "teamId": "a9a443a1e1f24619819a088e24d05e0b", + "ownerEmail": "admin@example.com", + "visibility": "public" + }, + { + "id": "5aba20acc697411aacb27238804b846d", + "originalName": "postServicesDataV590ChatterFeedElements", + "url": "http://localhost:9003/sse", + "description": "Post a feed item\n\n\n**Responses:**\n\n- **200** (Success): OK\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n "actor": {\n "additionalLabel": "string",\n "communityNickname": "string",\n "companyName": "string"\n },\n "body": {\n "isRichText": true,\n "messageSegments": [\n {\n "altText": "string",\n "htmlTag": "string",\n "tag": "string"\n }\n ],\n "text": "string"\n },\n "capabilities": {\n "associatedActions": {\n "platformActionGroups": [\n {\n "category": "string",\n "id": "string",\n "modifiedDate": "string"\n }\n ]\n },\n "bookmarks": {\n "isBookmarkedByCurrentUser": true\n },\n "chatterLikes": {\n "isLikedByCurrentUser": true,\n "likesMessage": "string",\n "myLike": "string"\n }\n }\n}\n```\n\n- **400**: Bad Request\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n "message": "string",\n "errorcode": "string"\n}\n```\n\n- **401**: UnAuthorised\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n "message": "string",\n "errorcode": "string"\n}\n```", + "requestType": "SSE", + "integrationType": "MCP", + "headers": null, + "inputSchema": { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "messageSegments": { + "title": "Feed item", + "type": "array", + "items": { + "type": "object", + "properties": { + "text": { + "title": "Text", + "type": "string", + "x-ibm-order": 1, + "x-ibm-multiline": "false" + }, + "type": { + "title": "Type", + "type": "string", + "default": "Text", + "x-ibm-order": 2, + "x-ibm-disable": true, + "x-ibm-multiline": "false" + } + }, + "default": { + "text": null, + "type": "Text" + } + } + } + } + }, + "subjectId": { + "title": "SubjectId", + "type": "string", + "x-ibm-order": 3, + "x-ibm-show": false, + "x-ibm-multiline": "false" + }, + "feedElementType": { + "title": "FeedElementType", + "type": "string", + "description": "", + "default": "FeedItem", + "x-ibm-order": 4, + "x-ibm-show": false, + "x-ibm-multiline": "false" + }, + "capabilities": { + "title": "Capabilities", + "type": "object", + "properties": { + "feedEntityShare": { + "title": "FeedEntityShare", + "type": "object", + "properties": { + "feedEntityId": { + "title": "FeedEntityId", + "type": "string", + "x-ibm-order": 5, + "x-ibm-show": false, + "x-ibm-multiline": "false" + } + } + } + } + } + }, + "required": [] + }, + "annotations": {}, + "jsonpathFilter": "", + "auth": null, + "createdAt": "2025-10-16T06:57:21.941578", + "updatedAt": "2025-10-16T06:57:21.941582", + "enabled": true, + "reachable": true, + "gatewayId": "c6cc57f28bf344c9b99613a883ab4622", + "executionCount": 0, + "metrics": { + "totalExecutions": 0, + "successfulExecutions": 0, + "failedExecutions": 0, + "failureRate": 0, + "minResponseTime": null, + "maxResponseTime": null, + "avgResponseTime": null, + "lastExecutionTime": null + }, + "name": "salesforce-post-a-feed-postservicesdatav590chatterfeedelements", + "displayName": "Postservicesdatav590Chatterfeedelements", + "gatewaySlug": "salesforce-post-a-feed", + "customName": "postServicesDataV590ChatterFeedElements", + "customNameSlug": "postservicesdatav590chatterfeedelements", + "tags": [], + "createdBy": "admin@example.com", + "createdFromIp": "127.0.0.1", + "createdVia": "federation", + "createdUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36", + "modifiedBy": null, + "modifiedFromIp": null, + "modifiedVia": null, + "modifiedUserAgent": null, + "importBatchId": null, + "federationSource": "salesforce post a feed", + "version": 1, + "teamId": "a9a443a1e1f24619819a088e24d05e0b", + "ownerEmail": "admin@example.com", + "visibility": "public" + } +] \ No newline at end of file diff --git a/mcpgateway/toolops/services.py b/mcpgateway/toolops/services.py new file mode 100644 index 000000000..5b6afaf3b --- /dev/null +++ b/mcpgateway/toolops/services.py @@ -0,0 +1,63 @@ +import json +import os +from mcpgateway.toolops.tool_format_conversion import convert_to_wxo_tool_spec +from toolops.validation.test_case_generation import TestcaseGeneration +from toolops.validation.nl_utterance_generation import NlUtteranceGeneration + + + +def get_mcp_cf_tool(tool_id): + # Add code to get all available tools from MCP context forge + pwd = os.getcwd() + mcp_cf_tools = json.load(open(os.path.join('mcpgateway','toolops','list_of_tools_from_mcp_cf.json'),'r')) + required_cf_tool = None + for cf_tool in mcp_cf_tools: + if cf_tool.get('id')==tool_id: + required_cf_tool=cf_tool + break + return required_cf_tool + + +def post_process_nl_test_cases(nl_test_cases): + test_cases = nl_test_cases.get('Test_scenarios') + for tc in test_cases: + for un_wanted in ['scenario_type','input']: + del tc[un_wanted] + return test_cases + + +async def validation_generate_test_cases(tool_id,LLM_PLATFORM = 'WATSONX',LLM_MODEL_ID = 'mistralai/mistral-medium-2505', + NUMBER_OF_TESTCASES = 5,NUMBER_OF_UTTERANCES = 2): + test_cases = [] + try: + mcp_cf_tool=get_mcp_cf_tool(tool_id) + if mcp_cf_tool is not None: + wxo_tool_spec = convert_to_wxo_tool_spec(mcp_cf_tool) + tc_generator = TestcaseGeneration(llm_model_id=LLM_MODEL_ID, llm_platform=LLM_PLATFORM, max_number_testcases_to_generate=NUMBER_OF_TESTCASES) + ip_test_cases, _ = tc_generator.testcase_generation_full_pipeline(wxo_tool_spec) + + nl_generator = NlUtteranceGeneration(llm_model_id=LLM_MODEL_ID, llm_platform=LLM_PLATFORM, max_nl_utterances=NUMBER_OF_UTTERANCES) + nl_test_cases = nl_generator.generate_nl(ip_test_cases) + test_cases = post_process_nl_test_cases(nl_test_cases) + else: + return "Tool ID - "+str(tool_id)+" doesn't exist" + except Exception as e: + print("Exception in validation_generate_test_cases - "+str(e)) + pass + return test_cases + + +if __name__=='__main__': + tool_id = "e228725d951f4877bcb80418e7a6f139" + test_cases = validation_generate_test_cases(tool_id) + print(test_cases) + + +# from toolops.validation.nl_utterance_generation import NlUtteranceGeneration +# print("Generating NL test case") +# print("Example test case with tool testing nl utterance") +# generator = NlUtteranceGeneration(llm_model_id=LLM_MODEL_ID, llm_platform=LLM_PLATFORM, max_nl_utterances=NUMBER_OF_UTTERANCES) +# nl_test_cases = generator.generate_nl(test_cases) +# print("-"*100) +# pretty_print(nl_test_cases.get('Test_scenarios')[-1]) +# print("-"*100) \ No newline at end of file diff --git a/mcpgateway/toolops/tool_format_conversion.py b/mcpgateway/toolops/tool_format_conversion.py new file mode 100644 index 000000000..af513c0f7 --- /dev/null +++ b/mcpgateway/toolops/tool_format_conversion.py @@ -0,0 +1,51 @@ +import json +from copy import deepcopy + + +wxo_tool_spec_template = {"binding": { + "python": { + "connections": {}, + "function": "mcp-cf-tool-default", + "requirements": [] + } + }, + "description": None, + "display_name": None, + "id": None, + "input_schema": { + "description": None, + "properties": {}, + "required": [], + "type": "object" + }, + "is_async": False, + "name": None, + "output_schema": { + "description": None, + "properties": {}, + "required": [], + "type": "object" + }, + "permission": "read_only" + } + +def convert_to_wxo_tool_spec(mcp_cf_tool): + wxo_tool_spec = deepcopy(wxo_tool_spec_template) + wxo_tool_spec['description']= mcp_cf_tool.get('description',None) + wxo_tool_spec['display_name']= mcp_cf_tool.get('displayName',None) + wxo_tool_spec['id']= mcp_cf_tool.get('id',None) + wxo_tool_spec['input_schema']['description']=mcp_cf_tool.get('inputSchema',{}).get('description',None) + wxo_tool_spec['input_schema']['properties']=mcp_cf_tool.get('inputSchema',{}).get('properties',{}) + wxo_tool_spec['input_schema']['required']=mcp_cf_tool.get('inputSchema',{}).get('required',[]) + wxo_tool_spec['name']=mcp_cf_tool.get('name',None) + wxo_tool_spec['output_schema']['description']=mcp_cf_tool.get('outputSchema',{}).get('description',None) + wxo_tool_spec['output_schema']['properties']=mcp_cf_tool.get('outputSchema',{}).get('properties',{}) + wxo_tool_spec['output_schema']['required']=mcp_cf_tool.get('outputSchema',{}).get('required',[]) + return wxo_tool_spec + + +if __name__=="__main__": + mcp_cf_tools = json.load(open('./list_of_tools_from_mcp_cf.json','r')) + for mcp_cf_tool in mcp_cf_tools: + wxo_tool_spec = convert_to_wxo_tool_spec(mcp_cf_tool) + print(wxo_tool_spec) From 10186550ca3079b4d34c07057d1a8f1659742a08 Mon Sep 17 00:00:00 2001 From: rovallam Date: Mon, 27 Oct 2025 16:26:59 +0530 Subject: [PATCH 002/108] changes for toolops/enrichment/enrich_tool endpoint Signed-off-by: rovallam --- .env.example | 5 + mcpgateway/main.py | 26 +- mcpgateway/toolops/prompt_utils.py | 290 ++++++++++++++++++ .../toolops/prompts/tool_description.txt | 39 +++ mcpgateway/toolops/services.py | 81 +++++ 5 files changed, 431 insertions(+), 10 deletions(-) create mode 100644 mcpgateway/toolops/prompt_utils.py create mode 100644 mcpgateway/toolops/prompts/tool_description.txt diff --git a/.env.example b/.env.example index 34bfacd15..3ed918aa2 100644 --- a/.env.example +++ b/.env.example @@ -1071,3 +1071,8 @@ PAGINATION_INCLUDE_LINKS=true # Enable TLS for gRPC connections by default # MCPGATEWAY_GRPC_TLS_ENABLED=false + +# ToolOps Enrichment Env Variables +RITS_API_KEY= +RITS_MODEL_ID= +RITS_BASE_URL= diff --git a/mcpgateway/main.py b/mcpgateway/main.py index c34516d24..87bbda9c7 100644 --- a/mcpgateway/main.py +++ b/mcpgateway/main.py @@ -1238,29 +1238,35 @@ async def generate_testcases_for_tool(tool_id: str = Query(description="Tool ID" detail="Invalid JSON in request body", ) +from mcpgateway.toolops.services import enrich_tool @toolops_router.post("/enrichment/enrich_tool") -async def enrich_a_tool(tool_id: str = Query(None, description="Tool ID")) -> Dict: +async def enrich_a_tool(tool_id: str = Query(None, description="Tool ID"), db: Session = Depends(get_db)) -> dict[str, Any]: """ - Generate test cases for a tool - - This endpoint handles the automated tool enrichment by accepting - a tool id . The `require_auth` dependency ensures that - the user is authenticated before proceeding. + Enriches an input tool Args: tool_id: Tool ID in context forge. - user (str): The authenticated user (from `require_auth` dependency). + db (Session): The database session used to interact with the data store. Returns: - List: A list of test cases generated for the tool + Dict: A dict having the keys "tool_id", "tool_name", "original_desc" and "enriched_desc" with their corresponding values Raises: HTTPException: If the request body contains invalid JSON, a 400 Bad Request error is raised. """ try: - print("Tool - ", tool_id) + logger.info("Tool - " + tool_id) + enriched_tool_description, tool_schema = await enrich_tool(tool_id, tool_service, db) + result: dict[str, Any] = {} + result["tool_id"] = tool_id + result["tool_name"] = tool_schema.name + result["original_desc"] = tool_schema.description + result["enriched_desc"] = enriched_tool_description + logger.info ("result: "+ json.dumps(result, indent=4, sort_keys=False)) + #logger.debug(f"Authenticated user {user} is initializing the protocol.") - return {"enriched_tool":{"name":"test"}} + # return {"enriched_tool":{"name":"test"}} + return result except json.JSONDecodeError: raise HTTPException( diff --git a/mcpgateway/toolops/prompt_utils.py b/mcpgateway/toolops/prompt_utils.py new file mode 100644 index 000000000..153fd4c07 --- /dev/null +++ b/mcpgateway/toolops/prompt_utils.py @@ -0,0 +1,290 @@ +import json +import logging +from typing import Any + +import aiofiles as aiof +from dotenv import load_dotenv +from langchain_openai import OpenAI +import os + +from langchain_core.utils.json import parse_json_markdown +import re +from mcpgateway.services.mcp_client_chat_service import OpenAIConfig + +logger = logging.getLogger(__name__) + + + +def split_str_by_given_list_of_str(input_str, str_lst): # type: ignore # noqa: D103 + # add a '|' between the substrings to create the pattern for splitting + pattern = "|".join(str_lst) + # split the string using the pattern + res = re.split(pattern, input_str) + return res + + +def get_first_value(data, key): + """Get the first value found for a specified key in JSON data.""" + if isinstance(data, dict): + if key in data: + return data[key] + # Search nested dictionaries + for value in data.values(): + if isinstance(value, dict | list): + result = get_first_value(value, key) + if result is not None: + return result + elif isinstance(data, list): + # Search each item in array + for item in data: + if isinstance(item, dict | list): + result = get_first_value(item, key) + if result is not None: + return result + + return "" + + +def parse_as_json_string(responses, stop_sequences): # type: ignore + responses2 = split_str_by_given_list_of_str(responses, stop_sequences)[0] + out_dict = {} + if "```" in responses2: + out_dict = parse_json_markdown(responses2) + else: + try: + out_dict = json.loads(responses2) + except Exception: + try: + responses2 = responses2.replace("'", '"') + out_dict = json.loads(responses2) + except Exception: + out_dict = ast.literal_eval(responses2) + return out_dict + + +class OpenAIProvider: + """ + OpenAI provider implementation (non-Azure). + + Manages connection and interaction with OpenAI API or OpenAI-compatible endpoints. + + Attributes: + config: OpenAI configuration object. + + Examples: + >>> config = OpenAIConfig( + ... api_key="sk-...", + ... model="gpt-4" + ... ) + >>> provider = OpenAIProvider(config) + >>> provider.get_model_name() + 'gpt-4' + + Note: + The LLM instance is lazily initialized on first access for + improved startup performance. + """ + + def __init__(self, config: OpenAIConfig): + """ + Initialize OpenAI provider. + + Args: + config: OpenAI configuration with API key and settings. + + Examples: + >>> config = OpenAIConfig( + ... api_key="sk-...", + ... model="gpt-4" + ... ) + >>> provider = OpenAIProvider(config) + """ + self.config = config + self._llm = None + logger.info(f"Initializing OpenAI provider with model: {config.model}") + + def get_llm(self) -> OpenAI: + """ + Get OpenAI LLM instance with lazy initialization. + + Creates and caches the OpenAI chat model instance on first call. + Subsequent calls return the cached instance. + + Returns: + ChatOpenAI: Configured OpenAI chat model. + + Raises: + Exception: If LLM initialization fails (e.g., invalid credentials). + + Examples: + >>> config = OpenAIConfig( + ... api_key="sk-...", + ... model="gpt-4" + ... ) + >>> provider = OpenAIProvider(config) + >>> # llm = provider.get_llm() # Returns ChatOpenAI instance + """ + if self._llm is None: + try: + kwargs: dict[str, Any] = { + "openai_api_key": self.config.api_key, + "model": self.config.model, + "temperature": self.config.temperature, + "max_tokens": self.config.max_tokens, + "timeout": self.config.timeout, + "max_retries": self.config.max_retries, + } + + if self.config.base_url: + kwargs["base_url"] = self.config.base_url + kwargs["default_headers"] = {'RITS_API_KEY': self.config.api_key} + # self._llm = ChatOpenAI(**kwargs) + + self._llm = OpenAI(**kwargs) + + logger.info("OpenAI LLM instance created successfully") + except Exception as e: + logger.error(f"Failed to create OpenAI LLM: {e}") + raise + + return self._llm + + def get_model_name(self) -> str: + """ + Get the OpenAI model name. + + Returns: + str: The model name configured for this provider. + + Examples: + >>> config = OpenAIConfig( + ... api_key="sk-...", + ... model="gpt-4" + ... ) + >>> provider = OpenAIProvider(config) + >>> provider.get_model_name() + 'gpt-4' + """ + return self.config.model + + +async def generate_enriched_tool_description( + tool_name: str, + current_tool_description: str, + input_schema: dict[str,Any], + modelid: str, + llm_platform: str, + logfolder: str, + debug_mode: bool = False, +) -> str: + # modelid_toml = modelid.replace("/", "-") + prompts_dir = "prompts/" + currrent_dir = os.path.dirname(os.path.realpath(__file__)) + + prompt_file_template = os.path.join( + currrent_dir, prompts_dir, "tool_description.txt" + ) + + prompt_gen_str = "" + async with aiof.open(prompt_file_template) as f: + prompt_gen_str = await f.read() + + prompt_gen_str = prompt_gen_str + "\n" + prompt_gen_str = prompt_gen_str + "Input: {" + prompt_gen_str = prompt_gen_str + "\n" + prompt_gen_str = prompt_gen_str + '"tool_name": "' + tool_name + '",' + prompt_gen_str = prompt_gen_str + "\n" + prompt_gen_str = ( + prompt_gen_str + + '"current_tool_description": "' + + current_tool_description + + '",' + ) + prompt_gen_str = prompt_gen_str + "\n" + prompt_gen_str = prompt_gen_str + '"input_schema": "' + json.dumps(input_schema) + prompt_gen_str = prompt_gen_str + "\n" + prompt_gen_str = prompt_gen_str + "}" + prompt_gen_str = prompt_gen_str + "\n" + prompt_gen_str = prompt_gen_str + "\n" + prompt_gen_str = prompt_gen_str + "Output:" + + params_dict: dict[str, Any] = {} + params_dict["llm_model_name"] = modelid + # if modelid_toml in llm_config: + # params_dict["max_new_tokens"] = llm_config[modelid_toml]["max_new_tokens"] + # params_dict["stop_sequences"] = llm_config[modelid_toml]["stop_sequences"] + # else: + # params_dict["max_new_tokens"] = llm_config["default"]["max_new_tokens"] + # params_dict["stop_sequences"] = llm_config["default"]["stop_sequences"] + + promptfile = ( + logfolder + + "/" + + tool_name.lower() + + "_prompt_generate_operation_description.txt" + ) + + if debug_mode: + async with aiof.open(promptfile, "w") as out: + await out.write(prompt_gen_str) + await out.flush() + + def configure_env_vars(): + env_file = os.path.join(currrent_dir, ".env") + logger.info ("env_file: " + env_file) + load_dotenv(env_file, override=True, verbose=True) + + configure_env_vars() + api_key = os.getenv("RITS_API_KEY", "") + rits_base_url = os.getenv("RITS_BASE_URL", "") + rits_model_id = os.getenv("RITS_MODEL_ID", "") + + logger.info ("RITS_API_KEY: " + api_key) + logger.info ("rits_base_url: " + rits_base_url) + logger.info ("rits_model_id: " + rits_model_id) + stop_seq = ["###STOP###", "\n\n", "\n\n\n", "<|endoftext|>"] + config = OpenAIConfig(api_key=api_key, base_url = rits_base_url, temperature = 0.7, + model=rits_model_id, max_tokens=1000, timeout=None) + provider = OpenAIProvider(config) + provider.get_model_name() + llm_instance = provider.get_llm() + # response = llm_instance.invoke(prompt_gen_str) + responses = llm_instance.invoke(prompt_gen_str, stop=stop_seq) + logger.info ("response: " + responses) + + try: + if debug_mode: + async with aiof.open(promptfile, mode="a", encoding="utf-8") as f: + await f.write(responses) + + responses = responses.replace("<|eom_id|>", "").strip() + out_dict = parse_as_json_string(responses, stop_seq) + logger.info ("out_dict: " + str(out_dict)) + enriched_desc = out_dict["new_description"] + logger.info ("enriched_desc: " + str(enriched_desc)) + + except Exception as e1: + logger.info("error here3: " + str(e1) + ": promptfile : " + promptfile) + logger.error( + f"Exception {e1!s}! Invalid format returned by LLM1: {responses!s}", + extra={"details": ""}, + ) + enriched_desc = "" + + if debug_mode: + try: + # with open(promptfile, "a", encoding="utf-8") as file: + # file.write("\n\n" + "Refined LLM Output: " + enriched_desc) + async with aiof.open(promptfile, mode="a", encoding="utf-8") as f: + await f.write("\n\n" + "Refined LLM Output: " + enriched_desc) + + except Exception as e1: + logger.error( + f"Exception {e1!s} in gen_tool_param_desc_via_code!: ", + extra={"details": ""}, + ) + enriched_desc = "" + + logger.info("Return Value from generate_operation_description: %s", enriched_desc) + + return enriched_desc diff --git a/mcpgateway/toolops/prompts/tool_description.txt b/mcpgateway/toolops/prompts/tool_description.txt new file mode 100644 index 000000000..7113b45aa --- /dev/null +++ b/mcpgateway/toolops/prompts/tool_description.txt @@ -0,0 +1,39 @@ +Update MCP Tool Description + +Task: +Refine or rewrite the description of a tool hosted on an MCP server. The goal is a concise, clear, and informative description that improves upon or replaces the current one. The description needs to be updated based on various tool metadata available on the MCP server. + +Context: + +(a) MCP hosts tools from diverse sources (OpenAPI specifications, Python scripts, LLM-based workflows, etc). Metadata structure and detail may vary across tools. +(b) Tool metadata may be incomplete or inconsistent. Your description should remain coherent regardless. +(c) Descriptions are intended for users interacting with tools on the MCP platform; they should focus on the tool's purpose and functionality, not internal implementation. +(d) If the tool has optional inputs or advanced features indicated in the metadata, describe their effect without naming parameters explicitly. + + +Input Provided: + +(a) tool_name: The name of the tool. +(b) current_tool_description: The existing description of the tool (or null if missing). +(c) input_schema: A JSON object containing the tool's input parameters along with their descriptions. + - the structure of the input schema may vary and may not follow a standard format. + - the schema can include additional metadata or details about the inputs. + - for tools derived from an OpenAPI specification, these additional details may include request body parameters, response parameters, and other relevant API information. + + +Your Task: + +Generate an improved tool description that: +(a) Clearly explains the tool's purpose and functionality. +(b) Enhances the existing description if present; otherwise, create a new one. +(c) Incorporates insights from the input parameters (their role or effect) without listing exact names. +(d) Remains concise, avoiding redundancy or technical jargon. +(e) Reflects the tool's usage context on the MCP platform and is understandable to non-expert users. + +Output Format: + +Return the result in JSON: +{ + "new_description": "Your improved description here." +} + diff --git a/mcpgateway/toolops/services.py b/mcpgateway/toolops/services.py index 5b6afaf3b..f4732cfaa 100644 --- a/mcpgateway/toolops/services.py +++ b/mcpgateway/toolops/services.py @@ -3,6 +3,17 @@ from mcpgateway.toolops.tool_format_conversion import convert_to_wxo_tool_spec from toolops.validation.test_case_generation import TestcaseGeneration from toolops.validation.nl_utterance_generation import NlUtteranceGeneration +from mcpgateway.services.logging_service import LoggingService +from mcpgateway.services.tool_service import ToolService +from mcpgateway.schemas import ToolRead, ToolUpdate +from mcpgateway.toolops.prompt_utils import generate_enriched_tool_description +from sqlalchemy.orm import Session +import base64 +import datetime +from typing import Any + +logging_service = LoggingService() +logger = logging_service.get_logger(__name__) @@ -47,6 +58,76 @@ async def validation_generate_test_cases(tool_id,LLM_PLATFORM = 'WATSONX',LLM_MO return test_cases +def get_unique_sessionid() -> str: + timestamp = "" + timestamp = datetime.datetime.now().strftime( + "%Y-%m-%dT%H-%M-%S.%fZ-" + ) + base64.urlsafe_b64encode(os.urandom(6)).decode("ascii") + + return timestamp + +async def enrich_tool_list(tool_id_list: list[str], tool_service: ToolService, db: Session, LLM_PLATFORM: str = 'WATSONX',LLM_MODEL_ID: str = 'mistralai/mistral-medium-2505')-> tuple[list[str], list[ToolRead]]: + enriched_description_lst: list[str] = [] + tool_schema_lst: list[ToolRead] = [] + for _idx, tool_id in enumerate(tool_id_list): + enriched_description, tool_schema = await enrich_tool(tool_id, tool_service, db, LLM_PLATFORM,LLM_MODEL_ID) + enriched_description_lst.append(enriched_description) + tool_schema_lst.append(tool_schema) + + return enriched_description_lst, tool_schema_lst + + +async def enrich_tool(tool_id: str, tool_service: ToolService, db: Session, LLM_PLATFORM: str = 'WATSONX',LLM_MODEL_ID: str = 'mistralai/mistral-medium-2505')-> tuple[str, ToolRead]: + + try: + tool_schema: ToolRead = await tool_service.get_tool(db, tool_id) + except Exception as e: + logger.error(f"Failed to convert tool {tool_id} to schema: {e}") + raise e + + tool_name = tool_schema.name + current_tool_description = "" + if tool_schema.description: + current_tool_description = tool_schema.description + if current_tool_description: + current_tool_description = current_tool_description.replace( + "\n", "\\n" + ) + input_schema = tool_schema.input_schema + debug_mode = True + + logfolder = "log/" + if debug_mode: + sessionid = get_unique_sessionid() + logfolder = "log/" + sessionid + os.makedirs(logfolder, exist_ok=True) + + + enriched_description = await generate_enriched_tool_description( + tool_name, + current_tool_description, + input_schema, + LLM_MODEL_ID, + LLM_PLATFORM, + logfolder, + debug_mode + ) + if enriched_description: + try: + update_data: dict[str, Any] = { + "name": tool_name, + "description": enriched_description, + } + updateTool: ToolUpdate = ToolUpdate(**update_data) + updateTool.name = tool_name + updateTool.description = enriched_description + await tool_service.update_tool(db, tool_id, updateTool) + except Exception as e: + logger.error(f"Failed to update tool {tool_id} with enriched description: {e}") + raise e + + return enriched_description, tool_schema + if __name__=='__main__': tool_id = "e228725d951f4877bcb80418e7a6f139" test_cases = validation_generate_test_cases(tool_id) From c389da67e40a1b104ce520b66cc2a2cbeeedd2bc Mon Sep 17 00:00:00 2001 From: Jayachandu Bandlamudi Date: Mon, 27 Oct 2025 18:32:41 +0530 Subject: [PATCH 003/108] Updated read me and env file. --- .env.example | 2 +- mcpgateway/toolops/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 34bfacd15..0a8480a7b 100644 --- a/.env.example +++ b/.env.example @@ -939,7 +939,7 @@ REQUIRE_STRONG_SECRETS=false # Enable the LLM Chat functionality (true/false) # When disabled, LLM chat features will be completely hidden from UI and APIs # Default: false (must be explicitly enabled) -LLMCHAT_ENABLED=false +LLMCHAT_ENABLED=true # LLM Provider Selection # Options: azure_openai, openai, anthropic, aws_bedrock, ollama diff --git a/mcpgateway/toolops/README.md b/mcpgateway/toolops/README.md index 8464178d9..f6ad33c38 100644 --- a/mcpgateway/toolops/README.md +++ b/mcpgateway/toolops/README.md @@ -9,4 +9,4 @@ ### Starting MCP context forge from git repo * Install dependencies using `pip install .` -* `uvicorn mcpgateway.main:app --host 0.0.0.0 --port 4444 --workers 4` will start Context forge UI and APIs at http://localhost:4444/docs and toolops API endpoints will be shown. \ No newline at end of file +* `uvicorn mcpgateway.main:app --host 0.0.0.0 --port 4444 --workers 4 --env-file .env.example` will start Context forge UI and APIs at http://localhost:4444/docs and toolops API endpoints will be shown. \ No newline at end of file From f8f72a407d762996e1bb5c00935ac82353764b56 Mon Sep 17 00:00:00 2001 From: Jayachandu Bandlamudi Date: Mon, 27 Oct 2025 19:52:20 +0530 Subject: [PATCH 004/108] Integrated enrichment endpoint. --- .env.example | 10 ++-- .gitignore | 1 + ..._prompt_generate_operation_description.txt | 47 +++++++++++++++++++ ..._prompt_generate_operation_description.txt | 47 +++++++++++++++++++ mcpgateway/main.py | 4 +- mcpgateway/toolops/services.py | 6 ++- mcpgateway/toolops/tool_format_conversion.py | 12 +++-- 7 files changed, 116 insertions(+), 11 deletions(-) create mode 100644 log/2025-10-27T19-25-21.274399Z-B3NXIaO3/salesforce-post-a-feed-postservicesdatav590chatterfeedelements_prompt_generate_operation_description.txt create mode 100644 log/2025-10-27T19-45-24.985796Z-xhqh4ClI/salesforce-post-a-feed-postservicesdatav590chatterfeedelements_prompt_generate_operation_description.txt diff --git a/.env.example b/.env.example index 7a8f83601..ad81ccecf 100644 --- a/.env.example +++ b/.env.example @@ -1073,6 +1073,10 @@ PAGINATION_INCLUDE_LINKS=true # MCPGATEWAY_GRPC_TLS_ENABLED=false # ToolOps Enrichment Env Variables -RITS_API_KEY= -RITS_MODEL_ID= -RITS_BASE_URL= +RITS_API_KEY=c13ea1c26fd811b91531fcbcb580303f +RITS_MODEL_ID=meta-llama/llama-3-3-70b-instruct +RITS_BASE_URL=https://inference-3scale-apicast-production.apps.rits.fmaas.res.ibm.com +WATSONX_APIKEY=qbtLLM6IgAfZRPwdFuJrhFHvHfa_Yj0wSF4j8hRie161 +WATSONX_PROJECT_ID=f544d9e6-c9a7-4a6c-b177-3d66c117c892 +WATSONX_SPACE_ID=42a4aa0a-2e42-469d-8ff0-e85f22a0e360 +WML_API=https://us-south.ml.cloud.ibm.com \ No newline at end of file diff --git a/.gitignore b/.gitignore index 19649b92f..baf8664c5 100644 --- a/.gitignore +++ b/.gitignore @@ -256,3 +256,4 @@ tmp/ plugins_rust/target/ plugins_rust/**/*.rs.bk plugins_rust/Cargo.lock +.env.example diff --git a/log/2025-10-27T19-25-21.274399Z-B3NXIaO3/salesforce-post-a-feed-postservicesdatav590chatterfeedelements_prompt_generate_operation_description.txt b/log/2025-10-27T19-25-21.274399Z-B3NXIaO3/salesforce-post-a-feed-postservicesdatav590chatterfeedelements_prompt_generate_operation_description.txt new file mode 100644 index 000000000..c68f3da1f --- /dev/null +++ b/log/2025-10-27T19-25-21.274399Z-B3NXIaO3/salesforce-post-a-feed-postservicesdatav590chatterfeedelements_prompt_generate_operation_description.txt @@ -0,0 +1,47 @@ +Update MCP Tool Description + +Task: +Refine or rewrite the description of a tool hosted on an MCP server. The goal is a concise, clear, and informative description that improves upon or replaces the current one. The description needs to be updated based on various tool metadata available on the MCP server. + +Context: + +(a) MCP hosts tools from diverse sources (OpenAPI specifications, Python scripts, LLM-based workflows, etc). Metadata structure and detail may vary across tools. +(b) Tool metadata may be incomplete or inconsistent. Your description should remain coherent regardless. +(c) Descriptions are intended for users interacting with tools on the MCP platform; they should focus on the tool's purpose and functionality, not internal implementation. +(d) If the tool has optional inputs or advanced features indicated in the metadata, describe their effect without naming parameters explicitly. + + +Input Provided: + +(a) tool_name: The name of the tool. +(b) current_tool_description: The existing description of the tool (or null if missing). +(c) input_schema: A JSON object containing the tool's input parameters along with their descriptions. + - the structure of the input schema may vary and may not follow a standard format. + - the schema can include additional metadata or details about the inputs. + - for tools derived from an OpenAPI specification, these additional details may include request body parameters, response parameters, and other relevant API information. + + +Your Task: + +Generate an improved tool description that: +(a) Clearly explains the tool's purpose and functionality. +(b) Enhances the existing description if present; otherwise, create a new one. +(c) Incorporates insights from the input parameters (their role or effect) without listing exact names. +(d) Remains concise, avoiding redundancy or technical jargon. +(e) Reflects the tool's usage context on the MCP platform and is understandable to non-expert users. + +Output Format: + +Return the result in JSON: +{ + "new_description": "Your improved description here." +} + + +Input: { +"tool_name": "salesforce-post-a-feed-postservicesdatav590chatterfeedelements", +"current_tool_description": "Post a feed item\n\n\n**Responses:**\n\n- **200** (Success): OK\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n &quot;actor&quot;: {\n &quot;additionalLabel&quot;: &quot;string&quot;,\n &quot;communityNickname&quot;: &quot;string&quot;,\n &quot;companyName&quot;: &quot;string&quot;\n },\n &quot;body&quot;: {\n &quot;isRichText&quot;: true,\n &quot;messageSegments&quot;: [\n {\n &quot;altText&quot;: &quot;string&quot;,\n &quot;htmlTag&quot;: &quot;string&quot;,\n &quot;tag&quot;: &quot;string&quot;\n }\n ],\n &quot;text&quot;: &quot;string&quot;\n },\n &quot;capabilities&quot;: {\n &quot;associatedActions&quot;: {\n &quot;platformActionGroups&quot;: [\n {\n &quot;category&quot;: &quot;string&quot;,\n &quot;id&quot;: &quot;string&quot;,\n &quot;modifiedDate&quot;: &quot;string&quot;\n }\n ]\n },\n &quot;bookmarks&quot;: {\n &quot;isBookmarkedByCurrentUser&quot;: true\n },\n &quot;chatterLikes&quot;: {\n &quot;isLikedByCurrentUser&quot;: true,\n &quot;likesMessage&quot;: &quot;string&quot;,\n &quot;myLike&quot;: &quot;string&quot;\n }\n }\n}\n```\n\n- **400**: Bad Request\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n &quot;message&quot;: &quot;string&quot;,\n &quot;errorcode&quot;: &quot;string&quot;\n}\n```\n\n- **401**: UnAuthorised\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n &quot;message&quot;: &quot;string&quot;,\n &quot;errorcode&quot;: &quot;string&quot;\n}\n```", +"input_schema": "{"type": "object", "properties": {"body": {"type": "object", "properties": {"messageSegments": {"title": "Feed item", "type": "array", "items": {"type": "object", "properties": {"text": {"title": "Text", "type": "string", "x-ibm-order": 1, "x-ibm-multiline": "false"}, "type": {"title": "Type", "type": "string", "default": "Text", "x-ibm-order": 2, "x-ibm-disable": true, "x-ibm-multiline": "false"}}, "default": {"text": null, "type": "Text"}}}}}, "subjectId": {"title": "SubjectId", "type": "string", "x-ibm-order": 3, "x-ibm-show": false, "x-ibm-multiline": "false"}, "feedElementType": {"title": "FeedElementType", "type": "string", "description": "", "default": "FeedItem", "x-ibm-order": 4, "x-ibm-show": false, "x-ibm-multiline": "false"}, "capabilities": {"title": "Capabilities", "type": "object", "properties": {"feedEntityShare": {"title": "FeedEntityShare", "type": "object", "properties": {"feedEntityId": {"title": "FeedEntityId", "type": "string", "x-ibm-order": 5, "x-ibm-show": false, "x-ibm-multiline": "false"}}}}}}, "required": []} +} + +Output: \ No newline at end of file diff --git a/log/2025-10-27T19-45-24.985796Z-xhqh4ClI/salesforce-post-a-feed-postservicesdatav590chatterfeedelements_prompt_generate_operation_description.txt b/log/2025-10-27T19-45-24.985796Z-xhqh4ClI/salesforce-post-a-feed-postservicesdatav590chatterfeedelements_prompt_generate_operation_description.txt new file mode 100644 index 000000000..c68f3da1f --- /dev/null +++ b/log/2025-10-27T19-45-24.985796Z-xhqh4ClI/salesforce-post-a-feed-postservicesdatav590chatterfeedelements_prompt_generate_operation_description.txt @@ -0,0 +1,47 @@ +Update MCP Tool Description + +Task: +Refine or rewrite the description of a tool hosted on an MCP server. The goal is a concise, clear, and informative description that improves upon or replaces the current one. The description needs to be updated based on various tool metadata available on the MCP server. + +Context: + +(a) MCP hosts tools from diverse sources (OpenAPI specifications, Python scripts, LLM-based workflows, etc). Metadata structure and detail may vary across tools. +(b) Tool metadata may be incomplete or inconsistent. Your description should remain coherent regardless. +(c) Descriptions are intended for users interacting with tools on the MCP platform; they should focus on the tool's purpose and functionality, not internal implementation. +(d) If the tool has optional inputs or advanced features indicated in the metadata, describe their effect without naming parameters explicitly. + + +Input Provided: + +(a) tool_name: The name of the tool. +(b) current_tool_description: The existing description of the tool (or null if missing). +(c) input_schema: A JSON object containing the tool's input parameters along with their descriptions. + - the structure of the input schema may vary and may not follow a standard format. + - the schema can include additional metadata or details about the inputs. + - for tools derived from an OpenAPI specification, these additional details may include request body parameters, response parameters, and other relevant API information. + + +Your Task: + +Generate an improved tool description that: +(a) Clearly explains the tool's purpose and functionality. +(b) Enhances the existing description if present; otherwise, create a new one. +(c) Incorporates insights from the input parameters (their role or effect) without listing exact names. +(d) Remains concise, avoiding redundancy or technical jargon. +(e) Reflects the tool's usage context on the MCP platform and is understandable to non-expert users. + +Output Format: + +Return the result in JSON: +{ + "new_description": "Your improved description here." +} + + +Input: { +"tool_name": "salesforce-post-a-feed-postservicesdatav590chatterfeedelements", +"current_tool_description": "Post a feed item\n\n\n**Responses:**\n\n- **200** (Success): OK\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n &quot;actor&quot;: {\n &quot;additionalLabel&quot;: &quot;string&quot;,\n &quot;communityNickname&quot;: &quot;string&quot;,\n &quot;companyName&quot;: &quot;string&quot;\n },\n &quot;body&quot;: {\n &quot;isRichText&quot;: true,\n &quot;messageSegments&quot;: [\n {\n &quot;altText&quot;: &quot;string&quot;,\n &quot;htmlTag&quot;: &quot;string&quot;,\n &quot;tag&quot;: &quot;string&quot;\n }\n ],\n &quot;text&quot;: &quot;string&quot;\n },\n &quot;capabilities&quot;: {\n &quot;associatedActions&quot;: {\n &quot;platformActionGroups&quot;: [\n {\n &quot;category&quot;: &quot;string&quot;,\n &quot;id&quot;: &quot;string&quot;,\n &quot;modifiedDate&quot;: &quot;string&quot;\n }\n ]\n },\n &quot;bookmarks&quot;: {\n &quot;isBookmarkedByCurrentUser&quot;: true\n },\n &quot;chatterLikes&quot;: {\n &quot;isLikedByCurrentUser&quot;: true,\n &quot;likesMessage&quot;: &quot;string&quot;,\n &quot;myLike&quot;: &quot;string&quot;\n }\n }\n}\n```\n\n- **400**: Bad Request\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n &quot;message&quot;: &quot;string&quot;,\n &quot;errorcode&quot;: &quot;string&quot;\n}\n```\n\n- **401**: UnAuthorised\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **Example:**\n```json\n{\n &quot;message&quot;: &quot;string&quot;,\n &quot;errorcode&quot;: &quot;string&quot;\n}\n```", +"input_schema": "{"type": "object", "properties": {"body": {"type": "object", "properties": {"messageSegments": {"title": "Feed item", "type": "array", "items": {"type": "object", "properties": {"text": {"title": "Text", "type": "string", "x-ibm-order": 1, "x-ibm-multiline": "false"}, "type": {"title": "Type", "type": "string", "default": "Text", "x-ibm-order": 2, "x-ibm-disable": true, "x-ibm-multiline": "false"}}, "default": {"text": null, "type": "Text"}}}}}, "subjectId": {"title": "SubjectId", "type": "string", "x-ibm-order": 3, "x-ibm-show": false, "x-ibm-multiline": "false"}, "feedElementType": {"title": "FeedElementType", "type": "string", "description": "", "default": "FeedItem", "x-ibm-order": 4, "x-ibm-show": false, "x-ibm-multiline": "false"}, "capabilities": {"title": "Capabilities", "type": "object", "properties": {"feedEntityShare": {"title": "FeedEntityShare", "type": "object", "properties": {"feedEntityId": {"title": "FeedEntityId", "type": "string", "x-ibm-order": 5, "x-ibm-show": false, "x-ibm-multiline": "false"}}}}}}, "required": []} +} + +Output: \ No newline at end of file diff --git a/mcpgateway/main.py b/mcpgateway/main.py index 87bbda9c7..e6c6d0679 100644 --- a/mcpgateway/main.py +++ b/mcpgateway/main.py @@ -1208,7 +1208,7 @@ def update_url_protocol(request: Request) -> str: from mcpgateway.toolops.services import validation_generate_test_cases # Toolops APIs - Generating test cases , Tool enrichment # @toolops_router.post("/validation/generate_testcases") -async def generate_testcases_for_tool(tool_id: str = Query(description="Tool ID",default='e228725d951f4877bcb80418e7a6f139')) -> List[Dict]: +async def generate_testcases_for_tool(tool_id: str = Query(None, description="Tool ID"),db: Session = Depends(get_db)) -> List[Dict]: """ Generate test cases for a tool @@ -1229,7 +1229,7 @@ async def generate_testcases_for_tool(tool_id: str = Query(description="Tool ID" try: print("Running test case geneation for Tool - ", tool_id) #logger.debug(f"Authenticated user {user} is initializing the protocol.") - test_cases = await validation_generate_test_cases(tool_id) + test_cases = await validation_generate_test_cases(tool_id, tool_service, db) return test_cases except json.JSONDecodeError: diff --git a/mcpgateway/toolops/services.py b/mcpgateway/toolops/services.py index f4732cfaa..64417615c 100644 --- a/mcpgateway/toolops/services.py +++ b/mcpgateway/toolops/services.py @@ -37,11 +37,13 @@ def post_process_nl_test_cases(nl_test_cases): return test_cases -async def validation_generate_test_cases(tool_id,LLM_PLATFORM = 'WATSONX',LLM_MODEL_ID = 'mistralai/mistral-medium-2505', +async def validation_generate_test_cases(tool_id,tool_service: ToolService, db: Session,LLM_PLATFORM = 'WATSONX',LLM_MODEL_ID = 'mistralai/mistral-medium-2505', NUMBER_OF_TESTCASES = 5,NUMBER_OF_UTTERANCES = 2): test_cases = [] try: - mcp_cf_tool=get_mcp_cf_tool(tool_id) + #mcp_cf_tool=get_mcp_cf_tool(tool_id) + tool_schema: ToolRead = await tool_service.get_tool(db, tool_id) + mcp_cf_tool = tool_schema.to_dict(use_alias=True) if mcp_cf_tool is not None: wxo_tool_spec = convert_to_wxo_tool_spec(mcp_cf_tool) tc_generator = TestcaseGeneration(llm_model_id=LLM_MODEL_ID, llm_platform=LLM_PLATFORM, max_number_testcases_to_generate=NUMBER_OF_TESTCASES) diff --git a/mcpgateway/toolops/tool_format_conversion.py b/mcpgateway/toolops/tool_format_conversion.py index af513c0f7..bcce41be5 100644 --- a/mcpgateway/toolops/tool_format_conversion.py +++ b/mcpgateway/toolops/tool_format_conversion.py @@ -38,14 +38,18 @@ def convert_to_wxo_tool_spec(mcp_cf_tool): wxo_tool_spec['input_schema']['properties']=mcp_cf_tool.get('inputSchema',{}).get('properties',{}) wxo_tool_spec['input_schema']['required']=mcp_cf_tool.get('inputSchema',{}).get('required',[]) wxo_tool_spec['name']=mcp_cf_tool.get('name',None) - wxo_tool_spec['output_schema']['description']=mcp_cf_tool.get('outputSchema',{}).get('description',None) - wxo_tool_spec['output_schema']['properties']=mcp_cf_tool.get('outputSchema',{}).get('properties',{}) - wxo_tool_spec['output_schema']['required']=mcp_cf_tool.get('outputSchema',{}).get('required',[]) + if mcp_cf_tool.get('outputSchema') is not None: + wxo_tool_spec['output_schema']['description']=mcp_cf_tool.get('outputSchema',{}).get('description',None) + wxo_tool_spec['output_schema']['properties']=mcp_cf_tool.get('outputSchema',{}).get('properties',{}) + wxo_tool_spec['output_schema']['required']=mcp_cf_tool.get('outputSchema',{}).get('required',[]) + else: + wxo_tool_spec['output_schema']={} return wxo_tool_spec if __name__=="__main__": - mcp_cf_tools = json.load(open('./list_of_tools_from_mcp_cf.json','r')) + #mcp_cf_tools = json.load(open('./list_of_tools_from_mcp_cf.json','r')) + mcp_cf_tools = [json.load(open('mcp_cf_spec.json','r'))] for mcp_cf_tool in mcp_cf_tools: wxo_tool_spec = convert_to_wxo_tool_spec(mcp_cf_tool) print(wxo_tool_spec) From aafffc99b46240864def828901cf087a82914adf Mon Sep 17 00:00:00 2001 From: Jayachandu Bandlamudi Date: Tue, 28 Oct 2025 10:36:04 +0530 Subject: [PATCH 005/108] Added script to start MCP server for salesloft get all actions API. --- .gitignore | 1 + mcpgateway/toolops/README.md | 5 +- .../Wipro_FreshService_Create_a_ticket.json | 492 ++ ...o_SalesForce_Chatter_Post_a_feed_item.json | 3949 +++++++++++++++++ .../Wipro_Salesloft_Get_all_actions.json | 1 + .../Wipro_Salesloft_Get_an_account_stage.json | 1 + .../mcp-server-setup/mcp_server_setup.sh | 2 + .../toolops_fastmcp_server.py | 64 + 8 files changed, 4514 insertions(+), 1 deletion(-) create mode 100644 mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_FreshService_Create_a_ticket.json create mode 100644 mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_SalesForce_Chatter_Post_a_feed_item.json create mode 100644 mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_Salesloft_Get_all_actions.json create mode 100644 mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_Salesloft_Get_an_account_stage.json create mode 100644 mcpgateway/toolops/mcp-server-setup/mcp_server_setup.sh create mode 100644 mcpgateway/toolops/mcp-server-setup/toolops_fastmcp_server.py diff --git a/.gitignore b/.gitignore index baf8664c5..72c61dc6d 100644 --- a/.gitignore +++ b/.gitignore @@ -257,3 +257,4 @@ plugins_rust/target/ plugins_rust/**/*.rs.bk plugins_rust/Cargo.lock .env.example +nohup.out diff --git a/mcpgateway/toolops/README.md b/mcpgateway/toolops/README.md index f6ad33c38..14a2cbe02 100644 --- a/mcpgateway/toolops/README.md +++ b/mcpgateway/toolops/README.md @@ -9,4 +9,7 @@ ### Starting MCP context forge from git repo * Install dependencies using `pip install .` -* `uvicorn mcpgateway.main:app --host 0.0.0.0 --port 4444 --workers 4 --env-file .env.example` will start Context forge UI and APIs at http://localhost:4444/docs and toolops API endpoints will be shown. \ No newline at end of file +* `uvicorn mcpgateway.main:app --host 0.0.0.0 --port 4444 --workers 4 --env-file .env.example` will start Context forge UI and APIs at http://localhost:4444/docs and toolops API endpoints will be shown. + +### Testing toolops requires MCP server running to set up MCP server using OAPI specification +* `source mcpgateway/toolops/mcp-server-setup/mcp_server_setup.sh` running this script will start `salesloft get all actions` MCP server at port 9009 , which can be used for testing. \ No newline at end of file diff --git a/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_FreshService_Create_a_ticket.json b/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_FreshService_Create_a_ticket.json new file mode 100644 index 000000000..db734c095 --- /dev/null +++ b/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_FreshService_Create_a_ticket.json @@ -0,0 +1,492 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "FreshService", + "description": "", + "version": "1.0.0", + "x-ibm-annotations": "1.0.0", + "x-ibm-application-name": "FreshService", + "x-ibm-application-id": "freshservice-32ebbd73", + "x-ibm-disable-default-server-url": "true", + "x-ibm-tags": { + "categories": [ + "Business operations" + ] + }, + "x-ibm-application-icon": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n", + "x-ibm-created-date": "2023-12-22T07:56:38.117Z", + "contact": { + "name": "Testing" + }, + "x-ibm-skill-type": "external", + "x-ibm-skill-subtype": "public" + }, + "servers": [ + { + "url": "https://example.freshservice.com" + } + ], + "tags": [ + { + "name": "ticket" + } + ], + "paths": { + "/api/v2/tickets": { + "post": { + "summary": "Create a ticket", + "description": "in Freshservice", + "operationId": "postApiV2Tickets", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "title": "Requester", + "x-ibm-order": 1, + "x-ibm-multiline": "false", + "x-ibm-ui-extension": { + "component": "dropdown", + "actions": [ + { + "skill_id": "FreshService__1.0.0__getApiV2Requesters", + "mappings": { + "labels": "requesters.items.properties.primary_email", + "values": "requesters.items.properties.primary_email" + }, + "type": "data", + "params": {} + } + ] + } + }, + "subject": { + "type": "string", + "title": "Subject", + "x-ibm-order": 2, + "x-ibm-multiline": "false" + }, + "source": { + "type": "number", + "title": "Source", + "description": "Possible values : 1 - Email, 2 - Portal, 3 - Phone, 4 - Chat", + "minimum": 1, + "maximum": 4, + "x-ibm-order": 3, + "x-ibm-multiline": "false" + }, + "status": { + "type": "number", + "title": "Status", + "default": 2, + "x-ibm-show": false, + "description": "Possible values: 2- Open,3- Pending,4 - Resolved , 5 - Closed ", + "minimum": 2, + "maximum": 5, + "x-ibm-order": 4, + "x-ibm-multiline": "false" + }, + "priority": { + "type": "number", + "title": "Priority", + "description": "Possible value : 1 - Low,2 - Medium,3 - High,4 - Urgent", + "minimum": 1, + "maximum": 4, + "x-ibm-order": 5, + "x-ibm-multiline": "false" + }, + "description": { + "type": "string", + "title": "Description", + "x-ibm-order": 6, + "x-ibm-multiline": "true" + } + }, + "required": [ + "email", + "subject", + "status", + "priority", + "description" + ] + } + } + } + }, + "x-ibm-important": [ + "email", + "subject", + "source", + "status", + "priority", + "description" + ], + "x-ibm-order": [], + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ticket": { + "type": "object", + "properties": { + "cc_emails": { + "type": "array", + "items": {}, + "title": "Cc emails", + "x-ibm-show": false + }, + "fwd_emails": { + "type": "array", + "items": {}, + "title": "Fwd emails", + "x-ibm-show": false + }, + "reply_cc_emails": { + "type": "array", + "items": {}, + "title": "Reply cc emails", + "x-ibm-show": false + }, + "fr_escalated": { + "type": "boolean", + "title": "Fr escalated", + "x-ibm-show": false, + "x-ibm-order": 1 + }, + "spam": { + "type": "boolean", + "title": "Spam", + "x-ibm-show": false, + "x-ibm-order": 2 + }, + "email_config_id": { + "type": "string", + "title": "Email config id", + "x-ibm-show": false, + "nullable": true, + "x-ibm-order": 3 + }, + "group_id": { + "type": "string", + "title": "Group id", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 4 + }, + "priority": { + "type": "number", + "title": "Priority", + "x-ibm-order": 5 + }, + "requester_id": { + "type": "number", + "title": "Requester id", + "x-ibm-show": false, + "x-ibm-order": 6 + }, + "requested_for_id": { + "type": "number", + "title": "Requested for id", + "x-ibm-show": false, + "x-ibm-order": 7 + }, + "responder_id": { + "type": "string", + "title": "Responder id", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 8 + }, + "source": { + "type": "number", + "title": "Source", + "x-ibm-order": 9 + }, + "status": { + "type": "number", + "title": "Status", + "x-ibm-order": 10 + }, + "subject": { + "type": "string", + "title": "Subject", + "x-ibm-order": 11 + }, + "to_emails": { + "type": "string", + "title": "To emails", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 12 + }, + "department_id": { + "type": "string", + "title": "Department id", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 13 + }, + "id": { + "type": "number", + "title": "Id", + "x-ibm-show": false, + "x-ibm-order": 14 + }, + "type": { + "type": "string", + "title": "Type" + }, + "due_by": { + "type": "string", + "title": "Resolution due", + "x-ibm-order": 15 + }, + "fr_due_by": { + "type": "string", + "title": "First response due", + "x-ibm-order": 16 + }, + "is_escalated": { + "type": "boolean", + "title": "Is escalated", + "x-ibm-show": false, + "x-ibm-order": 17 + }, + "description": { + "type": "string", + "title": "Description", + "x-ibm-show": false, + "x-ibm-order": 18 + }, + "description_text": { + "type": "string", + "title": "Description", + "x-ibm-order": 19 + }, + "category": { + "type": "string", + "title": "Category", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 20 + }, + "sub_category": { + "type": "string", + "title": "Sub category", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 21 + }, + "item_category": { + "type": "string", + "title": "Item category", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 22 + }, + "custom_fields": { + "type": "object", + "properties": { + "major_incident_type": { + "type": "string", + "title": "Major incident type", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 23 + }, + "business_impact": { + "type": "string", + "title": "Business impact", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 24 + }, + "impacted_locations": { + "type": "string", + "title": "Impacted locations", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 25 + }, + "no_of_customers_impacted": { + "type": "string", + "title": "No of customers impacted", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 26 + } + }, + "title": "Custom fields", + "x-ibm-show": false + }, + "created_at": { + "type": "string", + "title": "Created at", + "x-ibm-order": 27 + }, + "updated_at": { + "type": "string", + "title": "Updated at", + "x-ibm-show": false, + "x-ibm-order": 28 + }, + "tags": { + "type": "array", + "items": {}, + "title": "Tags", + "x-ibm-show": false + }, + "attachments": { + "type": "array", + "items": {}, + "title": "Attachments" + }, + "workspace_id": { + "type": "number", + "title": "Workspace id", + "x-ibm-show": false, + "x-ibm-order": 29 + }, + "planned_start_date": { + "type": "string", + "title": "Planned start date", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 30 + }, + "planned_end_date": { + "type": "string", + "title": "Planned end date", + "x-ibm-show": false, + "nullable": true, + "x-ibm-order": 31 + }, + "planned_effort": { + "type": "string", + "title": "Planned effort", + "nullable": true, + "x-ibm-show": false, + "x-ibm-order": 32 + } + }, + "title": "Ticket created" + } + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string", + "title": "Field" + }, + "message": { + "type": "string", + "title": "Message" + }, + "code": { + "type": "string", + "title": "Code" + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "title": "Code" + }, + "message": { + "type": "string", + "title": "Message" + } + } + } + } + } + } + }, + "x-ibm-operation": { + "action": "create", + "model": "ticket" + }, + "x-ibm-mandatory": [], + "x-ibm-visible": true, + "tags": [ + "ticket" + ], + "security": [ + { + "basicAuth": [] + } + ], + "x-ibm-nl-intent-examples": [ + "Create a ticket", + "Start a ticket", + "Generate a ticket" + ], + "x-ibm-nl-entities": { + "entities": [] + }, + "x-ibm-nl-output-template": "Ticket was created successfully", + "x-ibm-next-actions": [], + "x-ibm-conversational-skill": true + } + } + }, + "components": { + "securitySchemes": { + "basicAuth": { + "type": "http", + "scheme": "basic", + "x-ibm-visible": true, + "x-ibm-auth": { + "username": { + "x-ibm-display-name": "Username", + "x-ibm-required": true + }, + "password": { + "x-ibm-display-name": "Password", + "x-ibm-required": false + } + } + } + } + } +} \ No newline at end of file diff --git a/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_SalesForce_Chatter_Post_a_feed_item.json b/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_SalesForce_Chatter_Post_a_feed_item.json new file mode 100644 index 000000000..165bd2dd0 --- /dev/null +++ b/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_SalesForce_Chatter_Post_a_feed_item.json @@ -0,0 +1,3949 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Salesforce Chatter", + "description": "", + "version": "1.0.0", + "x-ibm-annotations": "1.0.0", + "x-ibm-disable-default-server-url": "true", + "x-ibm-application-name": "Salesforce Chatter", + "x-ibm-application-id": "salesforce-chatter-32ebbd73", + "x-ibm-tags": { + "categories": [ + "Communication" + ] + }, + "x-ibm-application-icon": "\n\n \n \n \n \n \n \n \n ", + "x-ibm-created-date": "2023-11-24T07:24:21.073Z", + "contact": { + "name": "Testing" + }, + "x-ibm-skill-type": "external", + "x-ibm-skill-subtype": "public" + }, + "servers": [ + { + "url": "https://example.my.salesforce.com" + } + ], + "tags": [ + { + "name": "Post a feed item" + } + ], + "paths": { + "/services/data/v59.0/chatter/feed-elements": { + "post": { + "description": "", + "summary": "Post a feed item", + "x-ibm-ud-action": true, + "operationId": "postServicesDataV590ChatterFeedElements", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "messageSegments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "text": { + "type": "string", + "title": "Text", + "x-ibm-order": 1, + "x-ibm-multiline": "false" + }, + "type": { + "type": "string", + "title": "Type", + "default": "Text", + "x-ibm-order": 2, + "x-ibm-disable": true, + "x-ibm-multiline": "false" + } + }, + "default": { + "text": null, + "type": "Text" + } + }, + "title": "Feed item" + } + } + }, + "subjectId": { + "type": "string", + "title": "SubjectId", + "x-ibm-order": 3, + "x-ibm-show": false, + "x-ibm-multiline": "false" + }, + "feedElementType": { + "type": "string", + "title": "FeedElementType", + "description": "", + "default": "FeedItem", + "x-ibm-order": 4, + "x-ibm-show": false, + "x-ibm-multiline": "false" + }, + "capabilities": { + "type": "object", + "properties": { + "feedEntityShare": { + "type": "object", + "properties": { + "feedEntityId": { + "type": "string", + "title": "FeedEntityId", + "x-ibm-order": 5, + "x-ibm-show": false, + "x-ibm-multiline": "false" + } + }, + "title": "FeedEntityShare" + } + }, + "title": "Capabilities" + } + } + } + } + } + }, + "x-ibm-important": [ + "feedElementType", + "subjectId", + "body.messageSegments.text", + "body.messageSegments", + "body", + "body.messageSegments.type" + ], + "x-ibm-request-include": [ + "feedElementType", + "subjectId", + "body.messageSegments.text", + "body.messageSegments", + "body", + "body.messageSegments.type" + ], + "x-ibm-order": [], + "x-ibm-operation": { + "action": "create", + "model": "Feeds" + }, + "x-ibm-mandatory": [], + "x-ibm-visible": false, + "tags": [ + "Feeds" + ], + "security": [ + { + "oAuth2ClientCredentials": [] + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "actor": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel", + "nullable": true + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName", + "nullable": true + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif", + "x-ibm-show": false + }, + "mySubscription": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "url": { + "type": "string", + "title": "Url" + } + } + }, + "entityLabel": { + "type": "object", + "properties": { + "label": { + "type": "string", + "title": "Label" + }, + "labelPlural": { + "type": "string", + "title": "LabelPlural" + } + } + }, + "name": { + "type": "string", + "title": "Name" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice", + "x-ibm-show": false + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo", + "x-ibm-show": false + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "userType": { + "type": "string", + "title": "UserType" + } + }, + "title": "Actor" + }, + "body": { + "type": "object", + "properties": { + "isRichText": { + "type": "boolean", + "title": "IsRichText" + }, + "messageSegments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "altText": { + "type": "string", + "title": "AltText", + "nullable": true + }, + "htmlTag": { + "type": "string", + "title": "HtmlTag" + }, + "tag": { + "type": "string", + "title": "Tag" + }, + "markupType": { + "type": "string", + "title": "MarkupType" + }, + "text": { + "type": "string", + "title": "Text" + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url", + "nullable": true + }, + "topicUrl": { + "type": "string", + "title": "TopicUrl", + "nullable": true + }, + "accessible": { + "type": "boolean", + "title": "Accessible" + }, + "name": { + "type": "string", + "title": "Name" + }, + "valueType": { + "type": "string", + "title": "valueType" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + } + }, + "record": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel" + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName" + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "mySubscription": { + "type": "string", + "title": "MySubscription", + "nullable": true + }, + "name": { + "type": "string", + "title": "Name" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice" + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo" + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "userType": { + "type": "string", + "title": "UserType" + } + }, + "title": "Record" + }, + "contentSize": { + "type": "number", + "title": "ContentSize" + }, + "fileExtension": { + "type": "string", + "title": "FileExtension" + }, + "imageDetails": { + "type": "object", + "properties": { + "height": { + "type": "number", + "title": "Height" + }, + "imageFormat": { + "type": "string", + "title": "ImageFormat" + }, + "orientation": { + "type": "string", + "title": "Orientation" + }, + "width": { + "type": "number", + "title": "Width" + } + }, + "title": "ImageDetails" + }, + "thumbnails": { + "type": "object", + "properties": { + "fileId": { + "type": "string", + "title": "FileId" + }, + "previews": { + "type": "array", + "items": { + "type": "object", + "properties": { + "format": { + "type": "string", + "title": "Format" + }, + "previewUrlCount": { + "type": "number", + "title": "PreviewUrlCount" + }, + "previewUrls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "pageNumber": { + "type": "number", + "title": "PageNumber" + }, + "previewUrl": { + "type": "string", + "title": "PreviewUrl" + } + } + }, + "title": "PreviewUrls" + }, + "status": { + "type": "string", + "title": "Status" + }, + "url": { + "type": "string", + "title": "Url" + } + } + }, + "title": "Previews" + }, + "url": { + "type": "string", + "title": "Url" + }, + "versionNumber": { + "type": "string", + "title": "VersionNumber" + } + }, + "title": "Thumbnails" + }, + "id": { + "type": "string", + "description": "", + "title": "Id" + } + } + }, + "title": "MessageSegments", + "x-ibm-show": false + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "title": "Body" + }, + "capabilities": { + "type": "object", + "properties": { + "associatedActions": { + "type": "object", + "properties": { + "platformActionGroups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "category": { + "type": "string", + "title": "Category" + }, + "id": { + "type": "string", + "title": "Id" + }, + "modifiedDate": { + "type": "string", + "title": "ModifiedDate" + }, + "platformActions": { + "type": "object", + "items": { + "properties": { + "modifiedDate": { + "type": "string", + "title": "ModifiedDate" + }, + "actionUrl": { + "type": "string", + "title": "ActionUrl" + }, + "confirmationMessage": { + "type": "string", + "title": "confirmationMessage" + }, + "apiName": { + "type": "string", + "title": "ApiName" + }, + "groupDefault": { + "type": "boolean", + "title": "GroupDefault" + }, + "iconUrl": { + "type": "string", + "title": "IconUrl", + "nullable": true + }, + "label": { + "type": "string", + "title": "Label" + }, + "status": { + "type": "string", + "title": "Status" + }, + "type": { + "type": "string", + "title": "Type" + }, + "subtype": { + "type": "string", + "title": "Type" + } + } + } + }, + "url": { + "type": "string", + "title": "Url" + } + } + }, + "title": "PlatformActionGroups" + } + }, + "title": "AssociatedActions" + }, + "bookmarks": { + "type": "object", + "properties": { + "isBookmarkedByCurrentUser": { + "type": "boolean", + "title": "IsBookmarkedByCurrentUser" + } + }, + "title": "Bookmarks" + }, + "chatterLikes": { + "type": "object", + "properties": { + "isLikedByCurrentUser": { + "type": "boolean", + "title": "IsLikedByCurrentUser" + }, + "likesMessage": { + "type": "string", + "title": "LikesMessage", + "nullable": true + }, + "myLike": { + "type": "string", + "title": "MyLike", + "nullable": true + }, + "page": { + "type": "object", + "properties": { + "currentPageToken": { + "type": "number", + "title": "CurrentPageToken" + }, + "currentPageUrl": { + "type": "string", + "title": "CurrentPageUrl" + }, + "items": { + "type": "array", + "items": {}, + "title": "Items" + }, + "nextPageToken": { + "type": "string", + "title": "NextPageToken", + "nullable": true + }, + "nextPageUrl": { + "type": "string", + "title": "NextPageUrl", + "nullable": true + }, + "previousPageToken": { + "type": "string", + "title": "PreviousPageToken", + "nullable": true + }, + "previousPageUrl": { + "type": "string", + "title": "PreviousPageUrl", + "nullable": true + }, + "total": { + "type": "number", + "title": "Total" + } + }, + "title": "Page" + } + }, + "title": "ChatterLikes" + }, + "close": { + "type": "object", + "properties": { + "canContextUserUpdateIsClosed": { + "type": "boolean", + "title": "CanContextUserUpdateIsClosed" + }, + "isClosed": { + "type": "boolean", + "title": "IsClosed" + } + }, + "title": "Close" + }, + "comments": { + "type": "object", + "properties": { + "page": { + "type": "object", + "properties": { + "currentPageToken": { + "type": "string", + "title": "CurrentPageToken", + "nullable": true + }, + "currentPageUrl": { + "type": "string", + "title": "CurrentPageUrl" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "isRichText": { + "type": "boolean", + "title": "IsRichText" + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "title": "Body" + }, + "clientInfo": { + "type": "string", + "title": "ClientInfo", + "nullable": true + }, + "createdDate": { + "type": "string", + "title": "CreatedDate" + }, + "feedElement": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "FeedElement" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isDeleteRestricted": { + "type": "boolean", + "title": "IsDeleteRestricted" + }, + "likes": { + "type": "object", + "properties": { + "currentPageToken": { + "type": "string", + "title": "CurrentPageToken", + "nullable": true + }, + "currentPageUrl": { + "type": "string", + "title": "CurrentPageUrl" + }, + "items": { + "type": "array", + "items": {}, + "title": "Items" + }, + "nextPageToken": { + "type": "string", + "title": "NextPageToken", + "nullable": true + }, + "nextPageUrl": { + "type": "string", + "title": "NextPageUrl", + "nullable": true + }, + "previousPageToken": { + "type": "string", + "title": "PreviousPageToken", + "nullable": true + }, + "previousPageUrl": { + "type": "string", + "title": "PreviousPageUrl", + "nullable": true + }, + "total": { + "type": "number", + "title": "Total" + } + }, + "title": "Likes" + }, + "likesMessage": { + "type": "string", + "title": "LikesMessage", + "nullable": true + }, + "moderationFlags": { + "type": "string", + "title": "ModerationFlags", + "nullable": true + }, + "myLike": { + "type": "string", + "title": "MyLike", + "nullable": true + }, + "parent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Parent" + }, + "relativeCreatedDate": { + "type": "string", + "title": "RelativeCreatedDate" + }, + "threadLevel": { + "type": "number", + "title": "ThreadLevel" + }, + "threadParentId": { + "type": "string", + "title": "ThreadParentId", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "user": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel", + "nullable": true + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName", + "nullable": true + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "mySubscription": { + "type": "string", + "title": "MySubscription", + "nullable": true + }, + "name": { + "type": "string", + "title": "Name" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice" + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo" + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "userType": { + "type": "string", + "title": "UserType" + } + }, + "title": "User" + } + } + }, + "title": "Items" + }, + "nextPageToken": { + "type": "string", + "title": "NextPageToken", + "nullable": true + }, + "nextPageUrl": { + "type": "string", + "title": "NextPageUrl", + "nullable": true + }, + "previousPageToken": { + "type": "string", + "title": "PreviousPageToken", + "nullable": true + }, + "previousPageUrl": { + "type": "string", + "title": "PreviousPageUrl", + "nullable": true + }, + "total": { + "type": "number", + "title": "Total" + } + }, + "title": "Page" + } + }, + "title": "Comments" + }, + "edit": { + "type": "object", + "properties": { + "isEditRestricted": { + "type": "boolean", + "title": "IsEditRestricted" + }, + "isEditableByMeUrl": { + "type": "string", + "title": "IsEditableByMeUrl" + }, + "lastEditedBy": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel", + "nullable": true + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName", + "nullable": true + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "mySubscription": { + "type": "string", + "title": "MySubscription", + "nullable": true + }, + "name": { + "type": "string", + "title": "Name" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice" + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo" + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "userType": { + "type": "string", + "title": "UserType" + } + }, + "title": "LastEditedBy" + }, + "lastEditedDate": { + "type": "string", + "title": "LastEditedDate", + "nullable": true + }, + "latestRevision": { + "type": "number", + "title": "LatestRevision" + }, + "relativeLastEditedDate": { + "type": "string", + "title": "RelativeLastEditedDate", + "nullable": true + } + }, + "title": "Edit" + }, + "feedEntityShare": { + "type": "object", + "properties": { + "feedEntity": { + "type": "object", + "properties": { + "actor": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel", + "nullable": true + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName", + "nullable": true + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "mySubscription": { + "type": "string", + "title": "MySubscription", + "nullable": true + }, + "name": { + "type": "string", + "title": "Name" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice" + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo" + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "userType": { + "type": "string", + "title": "UserType" + } + }, + "title": "Actor" + }, + "body": { + "type": "object", + "properties": { + "isRichText": { + "type": "boolean", + "title": "IsRichText" + }, + "messageSegments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "text": { + "type": "string", + "title": "Text" + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + } + } + }, + "title": "MessageSegments" + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "title": "Body" + }, + "capabilities": { + "type": "object", + "properties": { + "chatterLikes": { + "type": "object", + "properties": { + "isLikedByCurrentUser": { + "type": "boolean", + "title": "IsLikedByCurrentUser" + }, + "likesMessage": { + "type": "string", + "title": "LikesMessage", + "nullable": true + }, + "myLike": { + "type": "string", + "title": "MyLike", + "nullable": true + }, + "page": { + "type": "object", + "properties": { + "currentPageToken": { + "type": "number", + "title": "CurrentPageToken" + }, + "currentPageUrl": { + "type": "string", + "title": "CurrentPageUrl" + }, + "items": { + "type": "array", + "items": {}, + "title": "Items" + }, + "nextPageToken": { + "type": "string", + "title": "NextPageToken", + "nullable": true + }, + "nextPageUrl": { + "type": "string", + "title": "NextPageUrl", + "nullable": true + }, + "previousPageToken": { + "type": "string", + "title": "PreviousPageToken", + "nullable": true + }, + "previousPageUrl": { + "type": "string", + "title": "PreviousPageUrl", + "nullable": true + }, + "total": { + "type": "number", + "title": "Total" + } + }, + "title": "Page" + } + }, + "title": "ChatterLikes" + }, + "close": { + "type": "object", + "properties": { + "canContextUserUpdateIsClosed": { + "type": "boolean", + "title": "CanContextUserUpdateIsClosed" + }, + "isClosed": { + "type": "boolean", + "title": "IsClosed" + } + }, + "title": "Close" + }, + "comments": { + "type": "object", + "properties": { + "page": { + "type": "object", + "properties": { + "currentPageToken": { + "type": "string", + "title": "CurrentPageToken", + "nullable": true + }, + "currentPageUrl": { + "type": "string", + "title": "CurrentPageUrl" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "isRichText": { + "type": "boolean", + "title": "IsRichText" + }, + "messageSegments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "text": { + "type": "string", + "title": "Text" + }, + "type": { + "type": "string", + "title": "Type" + } + } + }, + "title": "MessageSegments" + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "title": "Body" + }, + "capabilities": { + "type": "object", + "properties": { + "comments": { + "type": "object", + "properties": { + "page": { + "type": "object", + "properties": { + "currentPageToken": { + "type": "string", + "title": "CurrentPageToken", + "nullable": true + }, + "currentPageUrl": { + "type": "string", + "title": "CurrentPageUrl", + "nullable": true + }, + "items": { + "type": "array", + "items": {}, + "title": "Items" + }, + "nextPageToken": { + "type": "string", + "title": "NextPageToken", + "nullable": true + }, + "nextPageUrl": { + "type": "string", + "title": "NextPageUrl", + "nullable": true + }, + "previousPageToken": { + "type": "string", + "title": "PreviousPageToken", + "nullable": true + }, + "previousPageUrl": { + "type": "string", + "title": "PreviousPageUrl", + "nullable": true + }, + "total": { + "type": "number", + "title": "Total" + } + }, + "title": "Page" + } + }, + "title": "Comments" + }, + "edit": { + "type": "object", + "properties": { + "isEditRestricted": { + "type": "boolean", + "title": "IsEditRestricted" + }, + "isEditableByMeUrl": { + "type": "string", + "title": "IsEditableByMeUrl" + }, + "lastEditedBy": { + "type": "string", + "title": "LastEditedBy", + "nullable": true + }, + "lastEditedDate": { + "type": "string", + "title": "LastEditedDate", + "nullable": true + }, + "latestRevision": { + "type": "number", + "title": "LatestRevision" + }, + "relativeLastEditedDate": { + "type": "string", + "title": "RelativeLastEditedDate", + "nullable": true + } + }, + "title": "Edit" + }, + "status": { + "type": "object", + "properties": { + "feedEntityStatus": { + "type": "string", + "title": "FeedEntityStatus" + }, + "isApprovableByMe": { + "type": "boolean", + "title": "IsApprovableByMe" + } + }, + "title": "Status" + }, + "upDownVote": { + "type": "object", + "properties": { + "downVoteCount": { + "type": "number", + "title": "DownVoteCount" + }, + "myVote": { + "type": "string", + "title": "MyVote" + }, + "upVoteCount": { + "type": "number", + "title": "UpVoteCount" + } + }, + "title": "UpDownVote" + }, + "verified": { + "type": "object", + "properties": { + "isVerifiableByMe": { + "type": "boolean", + "title": "IsVerifiableByMe" + }, + "isVerified": { + "type": "boolean", + "title": "IsVerified" + }, + "isVerifiedByAnonymized": { + "type": "string", + "title": "IsVerifiedByAnonymized", + "nullable": true + }, + "lastVerifiedByUser": { + "type": "string", + "title": "LastVerifiedByUser", + "nullable": true + }, + "lastVerifiedDate": { + "type": "string", + "title": "LastVerifiedDate", + "nullable": true + } + }, + "title": "Verified" + } + }, + "title": "Capabilities" + }, + "clientInfo": { + "type": "object", + "properties": { + "applicationName": { + "type": "string", + "title": "ApplicationName" + }, + "applicationUrl": { + "type": "string", + "title": "ApplicationUrl", + "nullable": true + } + }, + "title": "ClientInfo" + }, + "createdDate": { + "type": "string", + "title": "CreatedDate" + }, + "feedElement": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "FeedElement" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isDeleteRestricted": { + "type": "boolean", + "title": "IsDeleteRestricted" + }, + "likes": { + "type": "object", + "properties": { + "currentPageToken": { + "type": "string", + "title": "CurrentPageToken", + "nullable": true + }, + "currentPageUrl": { + "type": "string", + "title": "CurrentPageUrl" + }, + "items": { + "type": "array", + "items": {}, + "title": "Items" + }, + "nextPageToken": { + "type": "string", + "title": "NextPageToken", + "nullable": true + }, + "nextPageUrl": { + "type": "string", + "title": "NextPageUrl", + "nullable": true + }, + "previousPageToken": { + "type": "string", + "title": "PreviousPageToken", + "nullable": true + }, + "previousPageUrl": { + "type": "string", + "title": "PreviousPageUrl", + "nullable": true + }, + "total": { + "type": "number", + "title": "Total" + } + }, + "title": "Likes" + }, + "likesMessage": { + "type": "string", + "title": "LikesMessage", + "nullable": true + }, + "moderationFlags": { + "type": "string", + "title": "ModerationFlags", + "nullable": true + }, + "myLike": { + "type": "string", + "title": "MyLike", + "nullable": true + }, + "parent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Parent" + }, + "relativeCreatedDate": { + "type": "string", + "title": "RelativeCreatedDate" + }, + "threadLevel": { + "type": "number", + "title": "ThreadLevel" + }, + "threadParentId": { + "type": "string", + "title": "ThreadParentId", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "user": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel", + "nullable": true + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName", + "nullable": true + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "mySubscription": { + "type": "string", + "title": "MySubscription", + "nullable": true + }, + "name": { + "type": "string", + "title": "Name" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice" + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo" + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "userType": { + "type": "string", + "title": "UserType" + } + }, + "title": "User" + } + } + }, + "title": "Items" + }, + "nextPageToken": { + "type": "string", + "title": "NextPageToken", + "nullable": true + }, + "nextPageUrl": { + "type": "string", + "title": "NextPageUrl", + "nullable": true + }, + "previousPageToken": { + "type": "string", + "title": "PreviousPageToken", + "nullable": true + }, + "previousPageUrl": { + "type": "string", + "title": "PreviousPageUrl", + "nullable": true + }, + "total": { + "type": "number", + "title": "Total" + } + }, + "title": "Page" + } + }, + "title": "Comments" + }, + "edit": { + "type": "object", + "properties": { + "isEditRestricted": { + "type": "boolean", + "title": "IsEditRestricted" + }, + "isEditableByMeUrl": { + "type": "string", + "title": "IsEditableByMeUrl" + }, + "lastEditedBy": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel", + "nullable": true + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName", + "nullable": true + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "mySubscription": { + "type": "string", + "title": "MySubscription", + "nullable": true + }, + "name": { + "type": "string", + "title": "Name" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice" + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo" + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "userType": { + "type": "string", + "title": "UserType" + } + }, + "title": "LastEditedBy" + }, + "lastEditedDate": { + "type": "string", + "title": "LastEditedDate", + "nullable": true + }, + "latestRevision": { + "type": "number", + "title": "LatestRevision" + }, + "relativeLastEditedDate": { + "type": "string", + "title": "RelativeLastEditedDate", + "nullable": true + } + }, + "title": "Edit" + }, + "interactions": { + "type": "object", + "properties": { + "count": { + "type": "number", + "title": "Count" + } + }, + "title": "Interactions" + }, + "readBy": { + "type": "object", + "properties": { + "isReadByMe": { + "type": "boolean", + "title": "IsReadByMe" + }, + "lastReadDateByMe": { + "type": "string", + "title": "LastReadDateByMe" + }, + "page": { + "type": "object", + "properties": { + "currentPageToken": { + "type": "string", + "title": "CurrentPageToken", + "nullable": true + }, + "currentPageUrl": { + "type": "string", + "title": "CurrentPageUrl" + }, + "nextPageToken": { + "type": "string", + "title": "NextPageToken", + "nullable": true + }, + "nextPageUrl": { + "type": "string", + "title": "NextPageUrl", + "nullable": true + }, + "previousPageToken": { + "type": "string", + "title": "PreviousPageToken", + "nullable": true + }, + "previousPageUrl": { + "type": "string", + "title": "PreviousPageUrl", + "nullable": true + }, + "total": { + "type": "number", + "title": "Total" + }, + "items": { + "type": "object", + "description": "", + "title": "Items", + "properties": {} + } + }, + "title": "Page" + } + }, + "title": "ReadBy" + }, + "status": { + "type": "object", + "properties": { + "feedEntityStatus": { + "type": "string", + "title": "FeedEntityStatus" + }, + "isApprovableByMe": { + "type": "boolean", + "title": "IsApprovableByMe" + } + }, + "title": "Status" + }, + "upDownVote": { + "type": "object", + "properties": { + "downVoteCount": { + "type": "number", + "title": "DownVoteCount" + }, + "myVote": { + "type": "string", + "title": "MyVote" + }, + "upVoteCount": { + "type": "number", + "title": "UpVoteCount" + } + }, + "title": "UpDownVote" + } + }, + "title": "Capabilities" + }, + "createdDate": { + "type": "string", + "title": "CreatedDate" + }, + "feedElementType": { + "type": "string", + "title": "FeedElementType" + }, + "header": { + "type": "object", + "properties": { + "isRichText": { + "type": "string", + "title": "IsRichText", + "nullable": true + }, + "messageSegments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "reference": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Reference" + }, + "text": { + "type": "string", + "title": "Text" + }, + "type": { + "type": "string", + "title": "Type" + } + } + }, + "title": "MessageSegments" + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "title": "Header" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isEntityAvailable": { + "type": "boolean", + "title": "IsEntityAvailable" + }, + "modifiedDate": { + "type": "string", + "title": "ModifiedDate" + }, + "originalFeedItem": { + "type": "string", + "title": "OriginalFeedItem", + "nullable": true + }, + "originalFeedItemActor": { + "type": "string", + "title": "OriginalFeedItemActor", + "nullable": true + }, + "parent": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel", + "nullable": true + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName", + "nullable": true + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "mySubscription": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "MySubscription" + }, + "name": { + "type": "string", + "title": "Name" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice" + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo" + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "userType": { + "type": "string", + "title": "UserType" + }, + "announcement": { + "type": "string", + "title": "Announcement", + "nullable": true + }, + "bannerPhoto": { + "type": "object", + "properties": { + "bannerPhotoUrl": { + "type": "string", + "title": "BannerPhotoUrl" + }, + "bannerPhotoVersionId": { + "type": "string", + "title": "BannerPhotoVersionId", + "nullable": true + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "BannerPhoto" + }, + "canHaveChatterGuests": { + "type": "boolean", + "title": "CanHaveChatterGuests" + }, + "community": { + "type": "string", + "title": "Community", + "nullable": true + }, + "description": { + "type": "string", + "title": "Description" + }, + "emailToChatterAddress": { + "type": "string", + "title": "EmailToChatterAddress" + }, + "isArchived": { + "type": "boolean", + "title": "IsArchived" + }, + "isAutoArchiveDisabled": { + "type": "boolean", + "title": "IsAutoArchiveDisabled" + }, + "isBroadcast": { + "type": "boolean", + "title": "IsBroadcast" + }, + "lastFeedElementPostDate": { + "type": "string", + "title": "LastFeedElementPostDate" + }, + "memberCount": { + "type": "number", + "title": "MemberCount" + }, + "myRole": { + "type": "string", + "title": "MyRole" + }, + "owner": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel", + "nullable": true + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName", + "nullable": true + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "mySubscription": { + "type": "string", + "title": "MySubscription", + "nullable": true + }, + "name": { + "type": "string", + "title": "Name" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice" + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo" + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "userType": { + "type": "string", + "title": "UserType" + } + }, + "title": "Owner" + }, + "visibility": { + "type": "string", + "title": "Visibility" + } + }, + "title": "Parent" + }, + "photoUrl": { + "type": "string", + "title": "PhotoUrl" + }, + "relativeCreatedDate": { + "type": "string", + "title": "RelativeCreatedDate" + }, + "url": { + "type": "string", + "title": "Url" + }, + "visibility": { + "type": "string", + "title": "Visibility" + } + }, + "title": "FeedEntity" + } + }, + "title": "FeedEntityShare" + }, + "interactions": { + "type": "object", + "properties": { + "count": { + "type": "number", + "title": "Count" + } + }, + "title": "Interactions" + }, + "mute": { + "type": "object", + "properties": { + "isMutedByMe": { + "type": "boolean", + "title": "IsMutedByMe" + } + }, + "title": "Mute" + }, + "readBy": { + "type": "object", + "properties": { + "isReadByMe": { + "type": "boolean", + "title": "IsReadByMe" + }, + "lastReadDateByMe": { + "type": "string", + "title": "LastReadDateByMe" + }, + "page": { + "type": "object", + "properties": { + "currentPageToken": { + "type": "string", + "title": "CurrentPageToken", + "nullable": true + }, + "currentPageUrl": { + "type": "string", + "title": "CurrentPageUrl" + }, + "items": { + "type": "array", + "items": {}, + "title": "Items" + }, + "nextPageToken": { + "type": "string", + "title": "NextPageToken", + "nullable": true + }, + "nextPageUrl": { + "type": "string", + "title": "NextPageUrl", + "nullable": true + }, + "previousPageToken": { + "type": "string", + "title": "PreviousPageToken", + "nullable": true + }, + "previousPageUrl": { + "type": "string", + "title": "PreviousPageUrl", + "nullable": true + }, + "total": { + "type": "number", + "title": "Total" + } + }, + "title": "Page" + } + }, + "title": "ReadBy" + }, + "status": { + "type": "object", + "properties": { + "feedEntityStatus": { + "type": "string", + "title": "FeedEntityStatus" + }, + "isApprovableByMe": { + "type": "boolean", + "title": "IsApprovableByMe" + } + }, + "title": "Status" + }, + "topics": { + "type": "object", + "properties": { + "canAssignTopics": { + "type": "boolean", + "title": "CanAssignTopics" + }, + "items": { + "type": "array", + "items": {}, + "title": "Items" + } + }, + "title": "Topics" + }, + "upDownVote": { + "type": "object", + "properties": { + "downVoteCount": { + "type": "number", + "title": "DownVoteCount" + }, + "myVote": { + "type": "string", + "title": "MyVote" + }, + "upVoteCount": { + "type": "number", + "title": "UpVoteCount" + } + }, + "title": "UpDownVote" + }, + "questionAndAnswers": { + "type": "object", + "properties": { + "bestAnswer": { + "type": "string", + "title": "BestAnswer", + "nullable": true + }, + "bestAnswerSelectedBy": { + "type": "string", + "title": "BestAnswerSelectedBy", + "nullable": true + }, + "canCurrentUserSelectOrRemoveBestAnswer": { + "type": "boolean", + "title": "CanCurrentUserSelectOrRemoveBestAnswer" + }, + "candidateAnswers": { + "type": "string", + "title": "CandidateAnswers", + "nullable": true + }, + "escalatedCase": { + "type": "string", + "title": "EscalatedCase", + "nullable": true + }, + "questionTitle": { + "type": "string", + "title": "QuestionTitle" + } + }, + "title": "QuestionAndAnswers" + } + }, + "title": "Capabilities", + "x-ibm-show": false + }, + "clientInfo": { + "type": "object", + "properties": { + "applicationName": { + "type": "string", + "title": "ApplicationName" + }, + "applicationUrl": { + "type": "string", + "title": "ApplicationUrl", + "nullable": true + } + }, + "title": "ClientInfo" + }, + "createdDate": { + "type": "string", + "title": "CreatedDate" + }, + "event": { + "type": "boolean", + "title": "Event", + "x-ibm-show": false + }, + "feedElementType": { + "type": "string", + "title": "FeedElementType", + "x-ibm-show": false + }, + "hasVerifiedComment": { + "type": "boolean", + "title": "HasVerifiedComment", + "x-ibm-show": false + }, + "header": { + "type": "object", + "properties": { + "isRichText": { + "type": "string", + "title": "IsRichText", + "nullable": true + }, + "messageSegments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "altText": { + "type": "string", + "title": "AltText", + "nullable": true + }, + "htmlTag": { + "type": "string", + "title": "HtmlTag" + }, + "tag": { + "type": "string", + "title": "Tag" + }, + "markupType": { + "type": "string", + "title": "MarkupType" + }, + "text": { + "type": "string", + "title": "Text" + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url", + "nullable": true + }, + "topicUrl": { + "type": "string", + "title": "TopicUrl", + "nullable": true + }, + "accessible": { + "type": "boolean", + "title": "Accessible" + }, + "name": { + "type": "string", + "title": "Name" + }, + "valueType": { + "type": "string", + "title": "valueType" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + } + }, + "record": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel" + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName" + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "mySubscription": { + "type": "string", + "title": "MySubscription", + "nullable": true + }, + "name": { + "type": "string", + "title": "Name" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice" + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo" + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "userType": { + "type": "string", + "title": "UserType" + } + }, + "title": "Record" + }, + "contentSize": { + "type": "number", + "title": "ContentSize" + }, + "fileExtension": { + "type": "string", + "title": "FileExtension" + }, + "imageDetails": { + "type": "object", + "properties": { + "height": { + "type": "number", + "title": "Height" + }, + "imageFormat": { + "type": "string", + "title": "ImageFormat" + }, + "orientation": { + "type": "string", + "title": "Orientation" + }, + "width": { + "type": "number", + "title": "Width" + } + }, + "title": "ImageDetails" + }, + "thumbnails": { + "type": "object", + "properties": { + "fileId": { + "type": "string", + "title": "FileId" + }, + "previews": { + "type": "array", + "items": { + "type": "object", + "properties": { + "format": { + "type": "string", + "title": "Format" + }, + "previewUrlCount": { + "type": "number", + "title": "PreviewUrlCount" + }, + "previewUrls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "pageNumber": { + "type": "number", + "title": "PageNumber" + }, + "previewUrl": { + "type": "string", + "title": "PreviewUrl" + } + } + }, + "title": "PreviewUrls" + }, + "status": { + "type": "string", + "title": "Status" + }, + "url": { + "type": "string", + "title": "Url" + } + } + }, + "title": "Previews" + }, + "url": { + "type": "string", + "title": "Url" + }, + "versionNumber": { + "type": "string", + "title": "VersionNumber" + } + }, + "title": "Thumbnails" + }, + "id": { + "type": "string", + "description": "", + "title": "Id" + } + } + }, + "title": "MessageSegments", + "x-ibm-show": false + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "title": "Header" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isDeleteRestricted": { + "type": "boolean", + "title": "IsDeleteRestricted", + "x-ibm-show": false + }, + "isSharable": { + "type": "boolean", + "title": "IsSharable", + "x-ibm-show": false + }, + "modifiedDate": { + "type": "string", + "title": "ModifiedDate", + "x-ibm-show": false + }, + "originalFeedItem": { + "type": "string", + "title": "OriginalFeedItem", + "nullable": true + }, + "originalFeedItemActor": { + "type": "string", + "title": "OriginalFeedItemActor", + "nullable": true + }, + "parent": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel", + "nullable": true + }, + "announcement": { + "type": "string", + "title": "Announcement", + "nullable": true + }, + "bannerPhoto": { + "type": "object", + "properties": { + "bannerPhotoUrl": { + "type": "string", + "title": "BannerPhotoUrl" + }, + "bannerPhotoVersionId": { + "type": "string", + "title": "BannerPhotoVersionId", + "nullable": true + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "BannerPhoto" + }, + "canHaveChatterGuests": { + "type": "boolean", + "title": "CanHaveChatterGuests" + }, + "community": { + "type": "string", + "title": "Community", + "nullable": true + }, + "description": { + "type": "string", + "title": "Description" + }, + "emailToChatterAddress": { + "type": "string", + "title": "EmailToChatterAddress" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isArchived": { + "type": "boolean", + "title": "IsArchived" + }, + "isAutoArchiveDisabled": { + "type": "boolean", + "title": "IsAutoArchiveDisabled" + }, + "isBroadcast": { + "type": "boolean", + "title": "IsBroadcast" + }, + "lastFeedElementPostDate": { + "type": "string", + "title": "LastFeedElementPostDate" + }, + "memberCount": { + "type": "number", + "title": "MemberCount" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "myRole": { + "type": "string", + "title": "MyRole" + }, + "mySubscription": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "MySubscription" + }, + "name": { + "type": "string", + "title": "Name" + }, + "owner": { + "type": "object", + "properties": { + "additionalLabel": { + "type": "string", + "title": "AdditionalLabel", + "nullable": true + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName", + "nullable": true + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "id": { + "type": "string", + "title": "Id" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "motif": { + "type": "object", + "properties": { + "color": { + "type": "string", + "title": "Color" + }, + "largeIconUrl": { + "type": "string", + "title": "LargeIconUrl" + }, + "mediumIconUrl": { + "type": "string", + "title": "MediumIconUrl" + }, + "smallIconUrl": { + "type": "string", + "title": "SmallIconUrl" + }, + "svgIconUrl": { + "type": "string", + "title": "SvgIconUrl", + "nullable": true + } + }, + "title": "Motif" + }, + "mySubscription": { + "type": "string", + "title": "MySubscription", + "nullable": true + }, + "name": { + "type": "string", + "title": "Name" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice" + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo" + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "userType": { + "type": "string", + "title": "UserType" + } + }, + "title": "Owner" + }, + "photo": { + "type": "object", + "properties": { + "fullEmailPhotoUrl": { + "type": "string", + "title": "FullEmailPhotoUrl" + }, + "largePhotoUrl": { + "type": "string", + "title": "LargePhotoUrl" + }, + "mediumPhotoUrl": { + "type": "string", + "title": "MediumPhotoUrl" + }, + "photoVersionId": { + "type": "string", + "title": "PhotoVersionId", + "nullable": true + }, + "smallPhotoUrl": { + "type": "string", + "title": "SmallPhotoUrl" + }, + "standardEmailPhotoUrl": { + "type": "string", + "title": "StandardEmailPhotoUrl" + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "title": "Photo" + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "visibility": { + "type": "string", + "title": "Visibility" + }, + "communityNickname": { + "type": "string", + "title": "CommunityNickname" + }, + "companyName": { + "type": "string", + "title": "CompanyName", + "nullable": true + }, + "displayName": { + "type": "string", + "title": "DisplayName" + }, + "firstName": { + "type": "string", + "title": "FirstName" + }, + "isActive": { + "type": "boolean", + "title": "IsActive" + }, + "isInThisCommunity": { + "type": "boolean", + "title": "IsInThisCommunity" + }, + "lastName": { + "type": "string", + "title": "LastName" + }, + "outOfOffice": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "title": "OutOfOffice" + }, + "reputation": { + "type": "string", + "title": "Reputation", + "nullable": true + }, + "title": { + "type": "string", + "title": "Title", + "nullable": true + }, + "userType": { + "type": "string", + "title": "UserType" + } + }, + "title": "Parent", + "x-ibm-show": false + }, + "photoUrl": { + "type": "string", + "title": "PhotoUrl", + "x-ibm-show": false + }, + "relativeCreatedDate": { + "type": "string", + "title": "RelativeCreatedDate", + "x-ibm-show": false + }, + "type": { + "type": "string", + "title": "Type" + }, + "url": { + "type": "string", + "title": "Url" + }, + "visibility": { + "type": "string", + "title": "Visibility" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Error Message" + }, + "errorcode": { + "type": "string", + "title": "error ID" + } + } + } + } + } + }, + "401": { + "description": "UnAuthorised", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "title": "Error Message" + }, + "errorcode": { + "type": "string", + "title": "error ID" + } + } + } + } + } + } + }, + "x-ibm-nl-intent-examples": [ + "Post a feed item" + ], + "x-ibm-nl-entities": { + "entities": [] + }, + "x-ibm-next-actions": [], + "x-ibm-nl-output-template": "Feed item was successfully posted." + } + } + }, + "components": { + "schemas": {}, + "securitySchemes": { + "oAuth2ClientCredentials": { + "type": "oauth2", + "x-ibm-visible": true, + "flows": { + "clientCredentials": { + "tokenUrl": "https://example.my.salesforce.com/services/oauth2/token", + "scopes": {} + } + }, + "x-ibm-auth": {} + } + }, + "x-ibm-pagination": { + "default-page-size": 10 + } + } +} \ No newline at end of file diff --git a/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_Salesloft_Get_all_actions.json b/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_Salesloft_Get_all_actions.json new file mode 100644 index 000000000..3b89aa398 --- /dev/null +++ b/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_Salesloft_Get_all_actions.json @@ -0,0 +1 @@ +{"openapi": "3.0.3", "info": {"contact": {"name": "Testing"}, "description": "from Salesloft", "title": "Salesloft", "version": "1.0.0", "x-ibm-annotations": "1.0.0", "x-ibm-application-icon": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n ", "x-ibm-application-id": "salesloft-32ebbd73", "x-ibm-application-name": "Salesloft", "x-ibm-created-date": "2024-05-29T07:11:22.439Z", "x-ibm-skill-subtype": "public", "x-ibm-skill-type": "external", "x-ibm-tags": {"categories": ["Sales"]}}, "servers": [{"url": "https://api.salesloft.com"}], "tags": [{"name": "action list"}], "paths": {"/v2/actions": {"get": {"description": "from Salesloft", "operationId": "getV2Actions", "parameters": [{"description": "the id's of actions", "in": "query", "name": "ids", "required": false, "schema": {"description": "Filter by action id", "example": 18, "type": "string", "x-ibm-examples": [345687678, 767763892]}, "x-ibm-multiline": "false", "x-ibm-order": 1, "x-ibm-show": false}, {"description": "The ID of the step to retrieve. If not provided, all steps for the pipeline will be returned.", "in": "query", "name": "step_id", "required": false, "schema": {"description": "Filter actions by step name", "title": "Step name", "type": "string", "x-ibm-category": "An-ID"}, "x-ibm-multiline": "false", "x-ibm-order": 2, "x-ibm-supported-operators": ["eq"], "x-ibm-ui-extension": {"actions": [{"mappings": {"labels": "data.items.properties.name", "values": "data.items.properties.id"}, "params": {}, "skill_id": "Salesloft__1.0.0__getV2Steps", "type": "data"}], "component": "dropdown"}}, {"description": "Filter actions by type. email, phone, integration etc.", "in": "query", "name": "type", "required": false, "schema": {"description": "Filter actions by type. Can be one of:email, phone,integration and other", "example": "filter", "title": "Type", "type": "string", "x-ibm-enum-descriptions": ["phone", "email", "integration", "other"], "x-ibm-examples": ["email", "phone"]}, "x-ibm-multiline": "false", "x-ibm-order": 3, "x-ibm-show": true, "x-ibm-supported-operators": ["eq"]}, {"description": "Returns all matching records that are greater than the provided iso8601 timestamp. The comparison is done using microsecond precision.", "in": "query", "name": "due_on[gt]", "required": false, "schema": {"description": "Returns actions that are due on after the provided date", "format": "date", "title": "Due on after the date", "type": "string", "x-ibm-category": "Date-Time"}, "x-ibm-multiline": "false", "x-ibm-order": 4, "x-ibm-property-pattern": "ISO", "x-ibm-show": true, "x-ibm-supported-operators": ["eq"]}, {"description": "Returns all matching records that are greater than or equal to the provided iso8601 timestamp. The date should be in iso8601 format.", "in": "query", "name": "due_on[gte]", "required": false, "schema": {"description": "Returns actions that are greater than or equal to the provided date", "example": "2018-01-01T00:00:00Z", "format": "date", "title": "Due on greater than or equal to date", "type": "string", "x-ibm-category": "Date-Time", "x-ibm-examples": ["2018-02-01T00:00:00Z", "2018-03-01T00:00:00Z"]}, "x-ibm-multiline": "false", "x-ibm-order": 5, "x-ibm-property-pattern": "ISO", "x-ibm-show": false, "x-ibm-supported-operators": ["eq"]}, {"description": "Returns all matching records that are less than the provided iso8601 timestamp. The comparison is done using microsecond precision.", "in": "query", "name": "due_on[lt]", "required": false, "schema": {"description": "Returns actions that are due on before the provided date", "example": "2018-01-01T00:00:00Z", "format": "date", "title": "Due on before the date", "type": "string", "x-ibm-category": "Date-Time", "x-ibm-examples": ["2018-01-02T00:00:00Z", "2018-01-03T00:00:00Z"]}, "x-ibm-multiline": "false", "x-ibm-order": 6, "x-ibm-property-pattern": "ISO", "x-ibm-show": true, "x-ibm-supported-operators": ["eq"]}, {"description": "Returns all matching records that are less than or equal to the provided iso8601 timestamp. The comparison is done using microsecond precision.", "in": "query", "name": "due_on[lte]", "required": false, "schema": {"description": "Returns actions that are less than or equal to the provided date", "example": "2018-01-01T00:00:00Z", "format": "date", "title": "Due on less than or equal to date", "type": "string", "x-ibm-category": "Date-Time"}, "x-ibm-multiline": "false", "x-ibm-order": 7, "x-ibm-property-pattern": "ISO", "x-ibm-show": false, "x-ibm-supported-operators": ["eq"]}, {"description": "Filters actions by the user's guid. Multiple user guids can be applied.", "in": "query", "name": "user_guid", "required": false, "schema": {"description": "Filters actions by the user's guid", "example": "12345678-1234-1234-1234-123456789012", "title": "User guid", "type": "string", "x-ibm-examples": [12345678, 12355668]}, "x-ibm-multiline": "false", "x-ibm-order": 8, "x-ibm-ui-extension": {"actions": [{"mappings": {"labels": "data.items.properties.name", "values": "data.items.properties.guid"}, "params": {}, "skill_id": "Salesloft__1.0.0__getV2Users", "type": "data"}], "component": "dropdown"}, "x-ibm-show": true}, {"description": "retrieves the records by using person name.", "in": "query", "name": "person_id", "required": false, "schema": {"description": "Filter actions by person name", "example": "123456", "title": "Person name", "type": "string", "x-ibm-category": "An-ID", "x-ibm-examples": ["319104110", "345678993"]}, "x-ibm-multiline": "false", "x-ibm-order": 9, "x-ibm-ui-extension": {"actions": [{"mappings": {"labels": "data.items.properties.first_name", "values": "data.items.properties.id"}, "params": {}, "skill_id": "Salesloft__1.0.0__getV2People", "type": "data"}], "component": "dropdown"}}, {"description": "The cadence id of the action", "in": "query", "name": "cadence_id", "required": false, "schema": {"description": "Filter actions by cadence name", "example": "123456789", "title": "Cadence name", "type": "string", "x-ibm-category": "An-ID", "x-ibm-examples": ["1030231", "1034653"]}, "x-ibm-multiline": "false", "x-ibm-order": 10, "x-ibm-ui-extension": {"actions": [{"mappings": {"labels": "data.items.properties.name", "values": "data.items.properties.id"}, "params": {}, "skill_id": "Salesloft__1.0.0__getV2Cadences", "type": "data"}], "component": "dropdown"}}, {"description": "The ID of the multitouch group to filter by. If not specified, all actions will be returned.", "in": "query", "name": "multitouch_group_id", "required": false, "schema": {"description": "Filter actions by multitouch group id", "example": 987667893, "title": "Multitouch group id", "type": "string", "x-ibm-examples": [345696969, 767088963]}, "x-ibm-multiline": "false", "x-ibm-order": 11, "x-ibm-show": false}, {"description": "Returns all matching records that are greater than the provided iso8601 timestamp. The comparison is done using microsecond precision.", "in": "query", "name": "updated_at[gt]", "required": false, "schema": {"description": "Returns actions that are updated after the provided date", "example": "2017-01-01T00:00:00Z", "format": "date", "title": "Updated on after the date", "type": "string", "x-ibm-category": "Date-Time", "x-ibm-examples": ["2018-01-01T00:00:00Z", "2019-01-01T00:00:00Z"]}, "x-ibm-multiline": "false", "x-ibm-order": 12, "x-ibm-property-pattern": "ISO", "x-ibm-show": true, "x-ibm-supported-operators": ["eq"]}, {"description": "Returns all matching records that are greater than or equal to the provided iso8601 timestamp. The comparison is done using microsecond precision.", "in": "query", "name": "updated_at[gte]", "required": false, "schema": {"description": "Returns actions that are greater than the provided date", "example": "2017-01-01T00:00:00Z", "format": "date", "title": "Updated at greater than or equal to the date", "type": "string", "x-ibm-category": "Date-Time", "x-ibm-examples": ["2018-01-01T00:00:00Z", "2019-01-01T00:00:00Z"]}, "x-ibm-multiline": "false", "x-ibm-order": 13, "x-ibm-property-pattern": "ISO", "x-ibm-show": false, "x-ibm-supported-operators": ["eq"]}, {"description": "Returns all matching records that are less than the provided iso8601 timestamp. The comparison is done using microsecond precision.", "in": "query", "name": "updated_at[lt]", "required": false, "schema": {"description": "Returns actions that are updated before the provided date", "example": "2017-01-01T00:00:00Z", "format": "date", "title": "Updated on before the date", "type": "string", "x-ibm-category": "Date-Time", "x-ibm-examples": ["2017-01-01T00:00:00.123Z", "2017-01-01T00:00:00.456Z"]}, "x-ibm-multiline": "false", "x-ibm-order": 14, "x-ibm-property-pattern": "ISO", "x-ibm-show": true, "x-ibm-supported-operators": ["eq"]}, {"description": "Returns all matching records that are less than or equal to the provided iso8601 timestamp. The comparison is done using microsecond precision.", "in": "query", "name": "updated_at[lte]", "required": false, "schema": {"description": "Returns actions that are less than or equal to the provided date", "example": "2017-01-01T00:00:00Z", "format": "date", "title": "Updated at less than or equal to the date", "type": "string", "x-ibm-category": "Date-Time", "x-ibm-examples": ["2017-01-01T00:00:00.123Z", "2017-01-01T00:00:00.456Z"]}, "x-ibm-multiline": "false", "x-ibm-order": 15, "x-ibm-property-pattern": "ISO", "x-ibm-show": false, "x-ibm-supported-operators": ["eq"]}, {"description": "The field to sort by. Defaults to created_at.", "in": "query", "name": "sort_by", "required": false, "schema": {"default": "updated_at", "description": "Key to sort on, must be one of: created_at, updated_at. Defaults to updated_at", "enum": ["updated_at", "created_at"], "example": "updated_at", "title": "Sort by", "type": "string", "x-ibm-enum-descriptions": ["updated at", "created at"], "x-ibm-examples": ["created_at"]}, "x-ibm-order": 16, "x-ibm-supported-operators": ["eq"]}, {"description": "The direction to sort the results in. Can be either `asc` or `desc`.", "in": "query", "name": "sort_direction", "required": false, "schema": {"default": "DESC", "description": "Direction to sort in, must be one of: ASC, DESC. Defaults to DESC", "enum": ["ASC", "DESC"], "example": "ASC", "title": "Sort direction", "type": "string", "x-ibm-enum-descriptions": ["ASC", "DESC"], "x-ibm-examples": ["DESC"]}, "x-ibm-order": 17, "x-ibm-supported-operators": ["eq"]}, {"description": "How many records to show per page in the range [1, 100]. Defaults to 25", "in": "query", "name": "per_page", "required": false, "schema": {"default": 25, "description": "How many records to show per page in the range [1, 100]. Defaults to 25", "example": 1, "maximum": 100, "minimum": 1, "title": "Per page", "type": "integer", "x-ibm-examples": [100, 25]}, "x-ibm-multiline": "false", "x-ibm-order": 18, "x-ibm-show": false, "x-ibm-supported-operators": ["eq"]}, {"description": "The current page to fetch results from. Defaults to 1.", "in": "query", "name": "page", "required": false, "schema": {"default": 1, "example": 1, "title": "Page", "type": "integer", "x-ibm-examples": [2, 3]}, "x-ibm-multiline": "false", "x-ibm-order": 19, "x-ibm-show": false, "x-ibm-supported-operators": ["eq"]}, {"description": "Whether to include total_pages and total_count in the metadata. Defaults to false", "in": "query", "name": "include_paging_counts", "required": false, "schema": {"default": false, "example": true, "title": "Include paging counts", "type": "boolean", "x-ibm-enum-descriptions": ["True", "False"], "x-ibm-examples": [false]}, "x-ibm-multiline": "false", "x-ibm-order": 20, "x-ibm-show": false}, {"description": "Specifies whether the max limit of 10k records should be applied to pagination counts. Affects the total_count and total_pages data.", "in": "query", "name": "limit_paging_counts", "required": false, "schema": {"example": true, "title": "Limit paging counts", "type": "boolean", "x-ibm-enum-descriptions": ["True", "False"], "x-ibm-examples": [false]}, "x-ibm-multiline": "false", "x-ibm-order": 21, "x-ibm-show": false}], "responses": {"200": {"content": {"application/json": {"schema": {"properties": {"data": {"description": "A list of objects containing the actions data from Salesloft", "items": {"description": "The data from Salesloft", "properties": {"action_details": {"description": "", "properties": {"_href": {"description": "The Salesloft API URL for the resource.", "example": "https://api.salesloft.com/v2/actions", "title": " href", "type": "string", "x-ibm-order": 15}, "id": {"description": "The action ID of the contact", "example": 18, "title": "Action id", "type": "string", "x-ibm-examples": [34566476, 76776453], "x-ibm-order": 16}}, "title": "Action details", "type": "object"}, "cadence": {"properties": {"_href": {"description": "The Salesloft API URL for the resource.", "example": "https://api.salesloft.com/v2/actions", "title": " href", "type": "string", "x-ibm-order": 21}, "id": {"description": "The cadence ID of the contact", "example": 18, "title": "Cadence id", "type": "string", "x-ibm-examples": [34567756, 76798287], "x-ibm-order": 22}}, "title": "Cadence", "type": "object"}, "created_at": {"description": "The date and time the action was created.", "example": "2019-01-01T00:00:00Z", "title": "Created date & time", "type": "string", "x-ibm-examples": ["2019-01-02T00:00:00Z", "2019-01-03T00:00:00Z"], "x-ibm-order": 9}, "due": {"description": "Indicates whether the action is overdue. Only valid for actions with a due_by date.", "example": true, "title": "Due status", "type": "boolean", "x-ibm-examples": [false], "x-ibm-order": 8}, "due_on": {"description": "The due date of the task. Must be in the format YYYY-MM-DD.", "example": "2022-01-01", "title": "Due date", "type": "string", "x-ibm-examples": ["2022-02-02", "2022-03-03"], "x-ibm-order": 12}, "id": {"description": "The Salesloft ID of the contact", "example": 18, "title": "Action id", "type": "string", "x-ibm-examples": [345684774, 767826929], "x-ibm-order": 7}, "multitouch_group_id": {"description": "The multitouch group id", "example": 1604426461, "nullable": true, "title": "Multitouch group id", "type": "string", "x-ibm-examples": [1604426461, 1604426461], "x-ibm-order": 13, "x-ibm-show": false}, "person": {"properties": {"_href": {"description": "The Salesloft API URL for the resource.", "example": "https://api.salesloft.com/v2/actions", "title": " href", "type": "string", "x-ibm-order": 19}, "id": {"description": "The person ID of the contact", "example": 18, "title": "Person id", "type": "string", "x-ibm-examples": [319104110, 767310410], "x-ibm-order": 20}}, "title": "Person", "type": "object"}, "status": {"description": "The status of the action. Possible values are: pending, in-progress, completed, and deleted.", "example": "pending", "title": "Status", "type": "string", "x-ibm-examples": ["in-progress", "completed"], "x-ibm-order": 11}, "step": {"description": "", "properties": {"_href": {"description": "The Salesloft API URL for the resource.", "example": "https://api.salesloft.com/v2/actions", "title": " href", "type": "string", "x-ibm-order": 23}, "id": {"description": "The Step ID of the contact", "example": 18, "title": "Step id", "type": "string", "x-ibm-examples": [7495251, 7679863], "x-ibm-order": 24}}, "title": "Step", "type": "object"}, "task": {"properties": {"_href": {"description": "The Salesloft API URL for the resource.", "example": "https://api.salesloft.com/v2/actions", "title": " href", "type": "string", "x-ibm-order": 25}, "id": {"description": "The Task ID of the contact", "example": 18, "title": "Task id", "type": "string", "x-ibm-examples": [402356224, 740356802], "x-ibm-order": 26}}, "title": "Task", "type": "object"}, "type": {"description": "The type of action to filter by. Possible values are: call, email, meeting, note, task, and custom_action.", "example": "email", "title": "Type", "type": "string", "x-ibm-examples": ["email", "phone"], "x-ibm-order": 14}, "updated_at": {"description": "The date and time the action was last updated.", "example": "2021-09-15T19:30:00Z", "title": "Updated date & time", "type": "string", "x-ibm-order": 10}, "user": {"properties": {"_href": {"description": "The Salesloft API URL for the resource.", "example": "https://api.salesloft.com/v2/actions", "title": " href", "type": "string", "x-ibm-order": 17}, "id": {"description": "The user ID of the contact", "example": 18, "title": "User id", "type": "string", "x-ibm-examples": [3456, 767], "x-ibm-order": 18}}, "title": "User", "type": "object"}}, "type": "object"}, "title": "Actions", "type": "array"}, "metadata": {"properties": {"filtering": {"properties": {}, "title": "Filtering", "type": "object"}, "paging": {"properties": {"current_page": {"description": "The page number to return. Defaults to 1.", "example": 1, "title": "Current page", "type": "number", "x-ibm-examples": [2, 3], "x-ibm-order": 2, "x-ibm-show": false}, "next_page": {"description": "The page number to fetch next", "example": 1, "title": "Next page", "type": "number", "x-ibm-examples": [2, 3], "x-ibm-order": 3, "x-ibm-show": false}, "per_page": {"description": "The number of records to return per page. Max 1000.", "example": 10, "title": "Per page", "type": "number", "x-ibm-examples": [25, 50], "x-ibm-order": 1, "x-ibm-show": false}, "prev_page": {"description": "The previous page of results. Use this to paginate through the results.", "example": "12", "nullable": true, "title": "Prev page", "type": "string", "x-ibm-examples": ["9"], "x-ibm-order": 4, "x-ibm-show": false}}, "title": "Paging", "type": "object"}, "sorting": {"properties": {"sort_by": {"description": "The field to sort by. Defaults to created_at.", "example": "created_at", "title": "Sort by", "type": "string", "x-ibm-examples": ["updated_at", "created_at"], "x-ibm-order": 5, "x-ibm-show": false}, "sort_direction": {"description": "The direction to sort the results in. Can be either `asc` or `desc`.", "example": "asc", "title": "Sort direction", "type": "string", "x-ibm-examples": ["desc"], "x-ibm-order": 6, "x-ibm-show": false}}, "title": "Sorting", "type": "object"}}, "title": "Metadata", "type": "object"}}, "type": "object"}}}, "description": "All actions were retrieved successfully."}, "401": {"content": {"application/json": {"schema": {"description": "The HTTP response status code for a 401 error. This is only applicable if you are using the OAuth 2.", "properties": {"errorCode": {"description": "The error code from Salesloft", "example": "ERR_BAD_REQUEST", "title": "Message", "type": "string", "x-ibm-examples": ["ERR_NOT_FOUND", "ERR_INTERNAL_SERVER_ERROR"]}, "message": {"description": "The message to send to the user.", "example": "Hello", "title": "Message", "type": "string", "x-ibm-examples": ["Goodbye", "Hi"]}}, "type": "object"}}}, "description": "The HTTP response status code for unauthorized access. The default is 401."}, "404": {"content": {"application/json": {"schema": {"description": "The HTTP response status code for a 404 error. This is only used when creating a new step.", "properties": {"errorCode": {"description": "The error code from Salesloft", "example": "ERR_BAD_REQUEST", "title": "Message", "type": "string", "x-ibm-examples": ["ERR_NOT_FOUND", "ERR_INTERNAL_SERVER_ERROR"]}, "message": {"description": "The message to send to the user.", "example": "Hello", "title": "Message", "type": "string", "x-ibm-examples": ["Goodbye", "Hi"]}}, "type": "object"}}}, "description": "The HTTP response status code for a Not Found (404) error."}}, "security": [{"bearerAuth": []}], "summary": "Get all actions", "tags": ["action list"], "x-ibm-conversational-skill": true, "x-ibm-mandatory": [], "x-ibm-next-actions": [], "x-ibm-nl-entities": {"entities": [{"entity": "sort_by", "fuzzy_match": true, "values": [{"synonyms": [], "type": "synonyms", "value": "updated_at"}, {"synonyms": [], "type": "synonyms", "value": "created_at"}]}, {"entity": "sort_direction", "fuzzy_match": true, "values": [{"synonyms": [], "type": "synonyms", "value": "ASC"}, {"synonyms": [], "type": "synonyms", "value": "DESC"}]}, {"entity": "type", "values": [{"value": "email", "synonyms": [], "type": "synonyms"}, {"value": "phone", "synonyms": [], "type": "synonyms"}, {"value": "integration", "synonyms": [], "type": "synonyms"}, {"value": "other", "synonyms": [], "type": "synonyms"}], "fuzzy_match": true}]}, "x-ibm-nl-intent-examples": ["Get all actions", "Fetch all actions", "Retrieve all actions", "Get all actions from salesloft", "Fetch all actions from salesloft", "Retrieve all actions from salesloft"], "x-ibm-operation": {"action": "retrieve", "model": "action list"}, "x-ibm-response-include": ["data", "data.action_details", "data.action_details._href", "data.action_details.id", "data.cadence", "data.cadence._href", "data.cadence.id", "data.created_at", "data.due", "data.due_on", "data.id", "data.multitouch_group_id", "data.person", "data.person._href", "data.person.id", "data.status", "data.step", "data.step._href", "data.step.id", "data.task", "data.task._href", "data.task.id", "data.type", "data.updated_at", "data.user", "data.user._href", "data.user.id", "metadata", "metadata.filtering", "metadata.paging", "metadata.paging.current_page", "metadata.paging.next_page", "metadata.paging.per_page", "metadata.paging.prev_page", "metadata.sorting", "metadata.sorting.sort_by", "metadata.sorting.sort_direction"], "x-ibm-visible": true}}}, "components": {"schemas": {"Action_list": {"description": "A list of actions to be performed on the specified resources. The following actions are supported:- `read`: Returns the details of a resource.", "properties": {"data": {"description": "A list of actions.", "items": {"description": "A dictionary containing the data to be used to create the action.", "properties": {"action_details": {"description": "{ type: object, properties: { action_type: { type: string, description: The type of action to perform. , enum: [ add_member, remove_member, change_role, change_manager, delete, join, leave, accept, reject, activate, deactivate, add_login, remove_login, add_email, remove_email, add_phone, remove_phone, add_address, remove_address, add_card, remove_card, add_key, remove_key, add_note, remove_note, add_custom_field, remove_custom_field, add.", "properties": {"_href": {"description": "The link to the current page.", "example": "https://api.example.com/v1/resources?page=1", "title": " href", "type": "string", "x-ibm-examples": ["https://api.example.com/v1/resources?page=2", "https://api.example.com/v1/resources?page=3"]}, "id": {"description": "The unique identifier of the action.", "example": 18, "title": "Id", "type": "number", "x-ibm-examples": [3456, 767]}}, "title": "Action details", "type": "object"}, "cadence": {"description": "{ type: object, properties: { frequency: { type: string, description: The frequency of the cadence. , enum: [ daily, weekly, monthly ] }, day_of_week: { type: string, description: The day of the week for the cadence.", "properties": {"_href": {"description": "The link to the current page.", "example": "https://api.example.com/v1/resources?page=1", "title": " href", "type": "string", "x-ibm-examples": ["https://api.example.com/v1/resources?page=2", "https://api.example.com/v1/resources?page=3"]}, "id": {"description": "The unique identifier of the action.", "example": 18, "title": "Id", "type": "number", "x-ibm-examples": [34568766, 76783966]}}, "title": "Cadence", "type": "object"}, "created_at": {"description": "The date and time the action was created.", "example": "2022-01-01T00:00:00Z", "title": "Created at", "type": "string", "x-ibm-examples": ["2022-01-02T00:00:00Z", "2022-01-03T00:00:00Z"]}, "due": {"description": "If true, only return overdue items", "example": true, "title": "Due", "type": "boolean", "x-ibm-examples": [false]}, "due_on": {"description": "The due date of the action. Format: YYYY-MM-DD.", "example": "2022-01-01", "title": "Due on", "type": "string", "x-ibm-examples": ["2022-02-02", "2022-03-03"]}, "id": {"description": "The unique identifier of the action.", "example": 182356224, "title": "Id", "type": "number", "x-ibm-examples": [3527169, 7166683]}, "multitouch_group_id": {"description": "The multitouch group id", "example": "group_1", "nullable": true, "title": "Multitouch group id", "type": "string", "x-ibm-examples": [1604389216, 1604426461]}, "person": {"properties": {"_href": {"description": "The link to the current page.", "example": "https://api.example.com/v1/resources?page=1", "title": " href", "type": "string", "x-ibm-examples": ["https://api.example.com/v1/resources?page=2", "https://api.example.com/v1/resources?page=3"]}, "id": {"description": "The unique identifier of the person.", "example": 18, "title": "Id", "type": "number", "x-ibm-examples": [34569877, 76763583]}}, "title": "Person", "type": "object"}, "status": {"description": "The status of the action. Can be one of: pending, completed, failed, cancelled.", "example": "pending", "title": "Status", "type": "string", "x-ibm-examples": ["completed", "failed"]}, "step": {"properties": {"_href": {"description": "The link to the current page.", "example": "https://api.example.com/v1/resources?page=1", "title": " href", "type": "string", "x-ibm-examples": ["https://api.example.com/v1/resources?page=2", "https://api.example.com/v1/resources?page=3"]}, "id": {"description": "The unique identifier of the step.", "example": 187988769, "title": "Id", "type": "number", "x-ibm-examples": [7495251, 7749525]}}, "title": "Step", "type": "object"}, "task": {"properties": {"_href": {"description": "The link to the current page.", "example": "https://api.example.com/v1/resources?page=1", "title": " href", "type": "string", "x-ibm-examples": ["https://api.example.com/v1/resources?page=2", "https://api.example.com/v1/resources?page=3"]}, "id": {"description": "The unique identifier of the task.", "example": 1876876, "title": "Id", "type": "number", "x-ibm-examples": [402356224, 402169847]}}, "title": "Task", "type": "object"}, "type": {"description": "The type of action to filter by. If not specified, all actions will be returned.", "example": "integrate", "title": "Type", "type": "string", "x-ibm-examples": ["phone", "email"]}, "updated_at": {"description": "The date and time the action was last updated.", "example": "2021-09-15T19:30:00Z", "title": "Updated at", "type": "string"}, "user": {"properties": {"_href": {"description": "The link to the current page.", "example": "https://api.example.com/v1/resources?page=1", "title": " href", "type": "string", "x-ibm-examples": ["https://api.example.com/v1/resources?page=2", "https://api.example.com/v1/resources?page=3"]}, "id": {"description": "The unique identifier of the user.", "example": 18, "title": "Id", "type": "number", "x-ibm-examples": [134490, 146661]}}, "title": "User", "type": "object"}}, "type": "object"}, "title": "Data", "type": "array"}, "metadata": {"description": "A dictionary of metadata to be stored with the action.", "properties": {"filtering": {"description": "A dictionary with keys as column names and values as a list of values to filter by. Example:{ 'name': ['John', 'Jane'], 'age': [20, 30]}This will return all the actions where the name is either John or Jane and the age is either 20 or 30.", "properties": {}, "title": "Filtering", "type": "object"}, "paging": {"properties": {"current_page": {"description": "The current page number of the collection to return.", "example": 1, "title": "Current page", "type": "number", "x-ibm-examples": [2, 3]}, "next_page": {"description": "The next page of results to fetch.", "example": 1, "title": "Next page", "type": "number", "x-ibm-examples": [3, 5]}, "per_page": {"description": "The number of items to return per page.", "example": 10, "title": "Per page", "type": "number", "x-ibm-examples": [20, 30]}, "prev_page": {"description": "The previous page of results. Use this parameter to get the previous page of results.", "example": "page=1", "nullable": true, "title": "Prev page", "type": "string", "x-ibm-examples": ["page=2", "page=3"]}}, "title": "Paging", "type": "object"}, "sorting": {"properties": {"sort_by": {"description": "The field to sort by. Can be one of: name, created_at, updated_at.", "example": "name", "title": "Sort by", "type": "string", "x-ibm-examples": ["created_at", "updated_at"]}, "sort_direction": {"description": "The direction to sort the results in. Can be either `asc` for ascending or `desc` for descending.", "example": "asc", "title": "Sort direction", "type": "string", "x-ibm-examples": ["desc"]}}, "title": "Sorting", "type": "object"}}, "title": "Metadata", "type": "object"}}, "type": "object"}}, "securitySchemes": {"bearerAuth": {"scheme": "bearer", "type": "http", "x-ibm-auth": {"token": {"x-ibm-display-name": "Token", "x-ibm-required": true}}, "x-ibm-visible": true}}}} \ No newline at end of file diff --git a/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_Salesloft_Get_an_account_stage.json b/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_Salesloft_Get_an_account_stage.json new file mode 100644 index 000000000..082985b15 --- /dev/null +++ b/mcpgateway/toolops/mcp-server-setup/api_specs/Wipro_Salesloft_Get_an_account_stage.json @@ -0,0 +1 @@ +{"openapi": "3.0.3", "info": {"title": "Salesloft", "description": "", "version": "1.0.0", "x-ibm-annotations": "1.0.0", "x-ibm-application-name": "Salesloft", "x-ibm-application-id": "salesloft-32ebbd73", "x-ibm-tags": {"categories": ["Marketing"]}, "x-ibm-application-icon": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ", "x-ibm-created-date": "2023-11-29T10:03:42.327Z", "contact": {"name": "Testing"}, "x-ibm-skill-type": "external", "x-ibm-skill-subtype": "public"}, "servers": [{"url": "https://api.salesloft.com"}], "tags": [{"name": "Account Test Stage"}], "paths": {"/v2/account_stages/{ID}": {"get": {"summary": "Get an account stage", "description": "", "operationId": "getV2AccountStagesById", "parameters": [{"name": "ID", "in": "path", "required": true, "schema": {"type": "string", "title": "Account stage"}, "x-ibm-order": 1, "x-ibm-multiline": "false", "x-ibm-ui-extension": {"component": "dropdown", "actions": [{"skill_id": "Salesloft__1.0.0__getV2AccountStages", "mappings": {"labels": "data.items.properties.name", "values": "data.items.properties.id"}, "type": "data", "params": {}}]}}], "responses": {"200": {"description": "The account stage was retrieved successfully.", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "integer", "title": "ID", "x-ibm-show": false}, "name": {"type": "string", "title": "Account stage"}, "created_at": {"type": "string", "title": "Created date & time"}, "updated_at": {"type": "string", "title": "Updated date & time"}, "order": {"type": "number", "title": "Order"}}, "title": "Account stage"}}}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}}, "x-ibm-operation": {"action": "retrieve", "model": "Fetch an account stage"}, "x-ibm-mandatory": [], "x-ibm-visible": true, "tags": ["Fetch an account stage"], "security": [{"bearerAuth": []}], "x-ibm-nl-intent-examples": ["Fetch an account stage", "Get me an account stage", "Show me an account stage"], "x-ibm-nl-entities": {"entities": []}, "x-ibm-next-actions": []}}}, "components": {"securitySchemes": {"bearerAuth": {"type": "http", "scheme": "bearer", "x-ibm-visible": true, "x-ibm-auth": {"token": {"x-ibm-display-name": "Token", "x-ibm-required": true}}}}}} \ No newline at end of file diff --git a/mcpgateway/toolops/mcp-server-setup/mcp_server_setup.sh b/mcpgateway/toolops/mcp-server-setup/mcp_server_setup.sh new file mode 100644 index 000000000..d62b77406 --- /dev/null +++ b/mcpgateway/toolops/mcp-server-setup/mcp_server_setup.sh @@ -0,0 +1,2 @@ +echo "setting up MCP server for salesloft get all actions OAPI at port 9009" +nohup python -m mcpgateway.translate --stdio "python ./toolops_fastmcp_server.py" --expose-streamable-http --expose-sse --port 9009 & diff --git a/mcpgateway/toolops/mcp-server-setup/toolops_fastmcp_server.py b/mcpgateway/toolops/mcp-server-setup/toolops_fastmcp_server.py new file mode 100644 index 000000000..caf715d17 --- /dev/null +++ b/mcpgateway/toolops/mcp-server-setup/toolops_fastmcp_server.py @@ -0,0 +1,64 @@ +import httpx +import json +from fastmcp import FastMCP +api_url = "https://api.salesloft.com" +api_spec_path = "./api_specs/Wipro_Salesloft_Get_all_actions.json" +mcp_server_name = "salesloft get all actions" +client = httpx.AsyncClient(base_url=api_url) +openapi_spec=json.load(open(api_spec_path,'r')) +# Create the MCP server +mcp = FastMCP.from_openapi(openapi_spec=openapi_spec, client=client, name=mcp_server_name) + +if __name__ == "__main__": + mcp.run() + + +''' +nohup python -m mcpgateway.translate --stdio "python ./toolops_fastmcp_server.py" --expose-streamable-http --expose-sse --port 9003 & +''' + + + +''' + +[ + { + "name": "salesloft all actions", + "displayName": "salesloft actions", + "url": "https://api.salesloft.com/v2/actions", + "integration_type": "REST", + "request_type": "GET", + "description": "Get all actions in salesloft", + "auth_type": "bearer", + "auth_value": "v2_ak_101644_dcdc81eaf282f78ca2a468e09a35a4e9b38e6712709028d80fe28a537ecd0d6d", + "headers": { + "Accept": "application/json", + "User-Agent": "MCP-Gateway/1.0" + }, + "input_schema": { + "type": "object", + "properties": { + "ids": { + "type": "string", + "description": "the ids of actions" + }, + "step_id": { + "type": "string", + "description": "The ID of the step to retrieve. If not provided, all steps for the pipeline will be returned." + }, + "type": { + "type": "string", + "description": "Filter actions by type. email, phone, integration etc." + } + }, + "required": ["ids"] + }, + "jsonpath_filter": "$.main", + "tags": [ + "salesloft","api" + ] + } +] + + +''' \ No newline at end of file From 711ec27dd0b84905af84aecc2e14c8c163c297bd Mon Sep 17 00:00:00 2001 From: Jayachandu Bandlamudi Date: Tue, 28 Oct 2025 11:20:21 +0530 Subject: [PATCH 006/108] temp commit . --- ...on => list_of_tools_from_mcp_cf copy.json} | 0 mcpgateway/toolops/salesloft_mcp_tool.json | 303 ++++++++++++++++++ 2 files changed, 303 insertions(+) rename mcpgateway/toolops/{list_of_tools_from_mcp_cf.json => list_of_tools_from_mcp_cf copy.json} (100%) create mode 100644 mcpgateway/toolops/salesloft_mcp_tool.json diff --git a/mcpgateway/toolops/list_of_tools_from_mcp_cf.json b/mcpgateway/toolops/list_of_tools_from_mcp_cf copy.json similarity index 100% rename from mcpgateway/toolops/list_of_tools_from_mcp_cf.json rename to mcpgateway/toolops/list_of_tools_from_mcp_cf copy.json diff --git a/mcpgateway/toolops/salesloft_mcp_tool.json b/mcpgateway/toolops/salesloft_mcp_tool.json new file mode 100644 index 000000000..4dc793f55 --- /dev/null +++ b/mcpgateway/toolops/salesloft_mcp_tool.json @@ -0,0 +1,303 @@ +[ + { + "id": "01731d582ee148a39b0ff9b56bc26678", + "originalName": "getV2Actions", + "url": "http://localhost:9009/sse", + "description": "from Salesloft\n\n\n**Query Parameters:**\n\n- **ids**: the id's of actions\n\n- **step_id**: The ID of the step to retrieve. If not provided, all steps for the pipeline will be returned.\n\n- **type**: Filter actions by type. email, phone, integration etc.\n\n- **due_on[gt]**: Returns all matching records that are greater than the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **due_on[gte]**: Returns all matching records that are greater than or equal to the provided iso8601 timestamp. The date should be in iso8601 format.\n\n- **due_on[lt]**: Returns all matching records that are less than the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **due_on[lte]**: Returns all matching records that are less than or equal to the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **user_guid**: Filters actions by the user's guid. Multiple user guids can be applied.\n\n- **person_id**: retrieves the records by using person name.\n\n- **cadence_id**: The cadence id of the action\n\n- **multitouch_group_id**: The ID of the multitouch group to filter by. If not specified, all actions will be returned.\n\n- **updated_at[gt]**: Returns all matching records that are greater than the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **updated_at[gte]**: Returns all matching records that are greater than or equal to the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **updated_at[lt]**: Returns all matching records that are less than the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **updated_at[lte]**: Returns all matching records that are less than or equal to the provided iso8601 timestamp. The comparison is done using microsecond precision.\n\n- **sort_by**: The field to sort by. Defaults to created_at.\n\n- **sort_direction**: The direction to sort the results in. Can be either `asc` or `desc`.\n\n- **per_page**: How many records to show per page in the range [1, 100]. Defaults to 25\n\n- **page**: The current page to fetch results from. Defaults to 1.\n\n- **include_paging_counts**: Whether to include total_pages and total_count in the metadata. Defaults to false\n\n- **limit_paging_counts**: Specifies whether the max limit of 10k records should be applied to pagination counts. Affects the total_count and total_pages data.\n\n\n**Responses:**\n\n- **200** (Success): All actions were retrieved successfully.\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **data**: A list of objects containing the actions data from Salesloft\n\n - **Example:**\n```json\n{\n "data": [\n {\n "action_details": {\n "_href": "https://api.salesloft.com/v2/actions",\n "id": 18\n },\n "cadence": {\n "_href": "https://api.salesloft.com/v2/actions",\n "id": 18\n },\n "created_at": "2019-01-01T00:00:00Z"\n }\n ],\n "metadata": {\n "filtering": {\n "key": "value"\n },\n "paging": {\n "current_page": 1,\n "next_page": 1,\n "per_page": 10\n },\n "sorting": {\n "sort_by": "created_at",\n "sort_direction": "asc"\n }\n }\n}\n```\n\n- **401**: The HTTP response status code for unauthorized access. The default is 401.\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **errorCode**: The error code from Salesloft\n\n - **message**: The message to send to the user.\n\n - **Example:**\n```json\n{\n "errorCode": "ERR_BAD_REQUEST",\n "message": "Hello"\n}\n```\n\n- **404**: The HTTP response status code for a Not Found (404) error.\n - Content-Type: `application/json`\n\n - **Response Properties:**\n\n - **errorCode**: The error code from Salesloft\n\n - **message**: The message to send to the user.\n\n - **Example:**\n```json\n{\n "errorCode": "ERR_BAD_REQUEST",\n "message": "Hello"\n}\n```", + "requestType": "SSE", + "integrationType": "MCP", + "headers": null, + "inputSchema": { + "type": "object", + "properties": { + "ids": { + "type": "string", + "description": "Filter by action id", + "example": 18, + "x-ibm-examples": [ + 345687678, + 767763892 + ] + }, + "step_id": { + "title": "Step name", + "type": "string", + "description": "Filter actions by step name", + "x-ibm-category": "An-ID" + }, + "type": { + "title": "Type", + "type": "string", + "description": "Filter actions by type. Can be one of:email, phone,integration and other", + "example": "filter", + "x-ibm-enum-descriptions": [ + "phone", + "email", + "integration", + "other" + ], + "x-ibm-examples": [ + "email", + "phone" + ] + }, + "due_on[gt]": { + "title": "Due on after the date", + "type": "string", + "description": "Returns actions that are due on after the provided date", + "format": "date", + "x-ibm-category": "Date-Time" + }, + "due_on[gte]": { + "title": "Due on greater than or equal to date", + "type": "string", + "description": "Returns actions that are greater than or equal to the provided date", + "format": "date", + "example": "2018-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2018-02-01T00:00:00Z", + "2018-03-01T00:00:00Z" + ] + }, + "due_on[lt]": { + "title": "Due on before the date", + "type": "string", + "description": "Returns actions that are due on before the provided date", + "format": "date", + "example": "2018-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2018-01-02T00:00:00Z", + "2018-01-03T00:00:00Z" + ] + }, + "due_on[lte]": { + "title": "Due on less than or equal to date", + "type": "string", + "description": "Returns actions that are less than or equal to the provided date", + "format": "date", + "example": "2018-01-01T00:00:00Z", + "x-ibm-category": "Date-Time" + }, + "user_guid": { + "title": "User guid", + "type": "string", + "description": "Filters actions by the user's guid", + "example": "12345678-1234-1234-1234-123456789012", + "x-ibm-examples": [ + 12345678, + 12355668 + ] + }, + "person_id": { + "title": "Person name", + "type": "string", + "description": "Filter actions by person name", + "example": "123456", + "x-ibm-category": "An-ID", + "x-ibm-examples": [ + "319104110", + "345678993" + ] + }, + "cadence_id": { + "title": "Cadence name", + "type": "string", + "description": "Filter actions by cadence name", + "example": "123456789", + "x-ibm-category": "An-ID", + "x-ibm-examples": [ + "1030231", + "1034653" + ] + }, + "multitouch_group_id": { + "title": "Multitouch group id", + "type": "string", + "description": "Filter actions by multitouch group id", + "example": 987667893, + "x-ibm-examples": [ + 345696969, + 767088963 + ] + }, + "updated_at[gt]": { + "title": "Updated on after the date", + "type": "string", + "description": "Returns actions that are updated after the provided date", + "format": "date", + "example": "2017-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2018-01-01T00:00:00Z", + "2019-01-01T00:00:00Z" + ] + }, + "updated_at[gte]": { + "title": "Updated at greater than or equal to the date", + "type": "string", + "description": "Returns actions that are greater than the provided date", + "format": "date", + "example": "2017-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2018-01-01T00:00:00Z", + "2019-01-01T00:00:00Z" + ] + }, + "updated_at[lt]": { + "title": "Updated on before the date", + "type": "string", + "description": "Returns actions that are updated before the provided date", + "format": "date", + "example": "2017-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2017-01-01T00:00:00.123Z", + "2017-01-01T00:00:00.456Z" + ] + }, + "updated_at[lte]": { + "title": "Updated at less than or equal to the date", + "type": "string", + "description": "Returns actions that are less than or equal to the provided date", + "format": "date", + "example": "2017-01-01T00:00:00Z", + "x-ibm-category": "Date-Time", + "x-ibm-examples": [ + "2017-01-01T00:00:00.123Z", + "2017-01-01T00:00:00.456Z" + ] + }, + "sort_by": { + "title": "Sort by", + "enum": [ + "updated_at", + "created_at" + ], + "type": "string", + "description": "Key to sort on, must be one of: created_at, updated_at. Defaults to updated_at", + "default": "updated_at", + "example": "updated_at", + "x-ibm-enum-descriptions": [ + "updated at", + "created at" + ], + "x-ibm-examples": [ + "created_at" + ] + }, + "sort_direction": { + "title": "Sort direction", + "enum": [ + "ASC", + "DESC" + ], + "type": "string", + "description": "Direction to sort in, must be one of: ASC, DESC. Defaults to DESC", + "default": "DESC", + "example": "ASC", + "x-ibm-enum-descriptions": [ + "ASC", + "DESC" + ], + "x-ibm-examples": [ + "DESC" + ] + }, + "per_page": { + "title": "Per page", + "maximum": 100, + "minimum": 1, + "type": "integer", + "description": "How many records to show per page in the range [1, 100]. Defaults to 25", + "default": 25, + "example": 1, + "x-ibm-examples": [ + 100, + 25 + ] + }, + "page": { + "title": "Page", + "type": "integer", + "default": 1, + "example": 1, + "x-ibm-examples": [ + 2, + 3 + ], + "description": "The current page to fetch results from. Defaults to 1." + }, + "include_paging_counts": { + "title": "Include paging counts", + "type": "boolean", + "default": false, + "example": true, + "x-ibm-enum-descriptions": [ + "True", + "False" + ], + "x-ibm-examples": [ + false + ], + "description": "Whether to include total_pages and total_count in the metadata. Defaults to false" + }, + "limit_paging_counts": { + "title": "Limit paging counts", + "type": "boolean", + "example": true, + "x-ibm-enum-descriptions": [ + "True", + "False" + ], + "x-ibm-examples": [ + false + ], + "description": "Specifies whether the max limit of 10k records should be applied to pagination counts. Affects the total_count and total_pages data." + } + }, + "required": [] + }, + "annotations": {}, + "jsonpathFilter": "", + "auth": null, + "createdAt": "2025-10-16T06:51:21.209380", + "updatedAt": "2025-10-16T06:51:21.209385", + "enabled": true, + "reachable": true, + "gatewayId": "26c7544731ae4326a53a9e698c4e7119", + "executionCount": 0, + "metrics": { + "totalExecutions": 0, + "successfulExecutions": 0, + "failedExecutions": 0, + "failureRate": 0, + "minResponseTime": null, + "maxResponseTime": null, + "avgResponseTime": null, + "lastExecutionTime": null + }, + "name": "salesloft-all-actions-getv2actions", + "displayName": "Getv2Actions", + "gatewaySlug": "salesloft-all-actions", + "customName": "getV2Actions", + "customNameSlug": "getv2actions", + "tags": [], + "createdBy": "admin@example.com", + "createdFromIp": "127.0.0.1", + "createdVia": "federation", + "createdUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36", + "modifiedBy": null, + "modifiedFromIp": null, + "modifiedVia": null, + "modifiedUserAgent": null, + "importBatchId": null, + "federationSource": "salesloft all actions", + "version": 1, + "teamId": "a9a443a1e1f24619819a088e24d05e0b", + "ownerEmail": "admin@example.com", + "visibility": "public" + } +] \ No newline at end of file From 9b91a3d7a03864de555edbfeae8c725423034dd0 Mon Sep 17 00:00:00 2001 From: Neelamadhav Gantayat Date: Tue, 28 Oct 2025 13:51:16 +0530 Subject: [PATCH 007/108] changes related to the UI. --- mcpgateway/main.py | 7 +- mcpgateway/static/admin.js | 161 +++++++++++++++++++++++++ mcpgateway/templates/admin.html | 204 ++++++++++++++++++++++++++++++++ mcpgateway/toolops.py | 121 +++++++++++++++++++ 4 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 mcpgateway/toolops.py diff --git a/mcpgateway/main.py b/mcpgateway/main.py index d18170efe..f2048b9ec 100644 --- a/mcpgateway/main.py +++ b/mcpgateway/main.py @@ -37,7 +37,7 @@ import uuid # Third-Party -from fastapi import APIRouter, Body, Depends, FastAPI, HTTPException, Query, Request, status, WebSocket, WebSocketDisconnect +from fastapi import APIRouter, Body, Depends, FastAPI, HTTPException, Query, Request, status, WebSocket, WebSocketDisconnect, Form from fastapi.background import BackgroundTasks from fastapi.exception_handlers import request_validation_exception_handler as fastapi_default_validation_handler from fastapi.exceptions import RequestValidationError @@ -123,6 +123,8 @@ from mcpgateway.utils.retry_manager import ResilientHttpClient from mcpgateway.utils.verify_credentials import require_auth, require_docs_auth_override, verify_jwt_token from mcpgateway.validation.jsonrpc import JSONRPCError +from mcpgateway.toolops import router as toolops_router + # Import the admin routes from the new module from mcpgateway.version import router as version_router @@ -4341,6 +4343,7 @@ async def cleanup_import_statuses(max_age_hours: int = 24, user=Depends(get_curr app.include_router(metrics_router) app.include_router(tag_router) app.include_router(export_import_router) +app.include_router(toolops_router) # Conditionally include A2A router if A2A features are enabled if settings.mcpgateway_a2a_enabled: @@ -4533,3 +4536,5 @@ async def root_info(): # Expose some endpoints at the root level as well app.post("/initialize")(initialize) app.post("/notifications")(handle_notification) + + diff --git a/mcpgateway/static/admin.js b/mcpgateway/static/admin.js index 9eeac6985..8b1beeb39 100644 --- a/mcpgateway/static/admin.js +++ b/mcpgateway/static/admin.js @@ -1,3 +1,162 @@ +document.addEventListener("DOMContentLoaded", () => { + const checkboxes = document.querySelectorAll(".tool-checkbox"); + const selectedList = document.getElementById("selectedList"); + const selectedCount = document.getElementById("selectedCount"); + const searchBox = document.getElementById("searchBox"); + const showInactive = document.getElementById("showInactive"); + const toolRows = document.querySelectorAll("#toolBody tr"); + + const viewButtons = document.querySelectorAll(".view-btn"); + const modal = document.getElementById("toolModal"); + const modalContent = document.getElementById("modalContent"); + const closeModal = document.getElementById("closeModal"); + + let selectedTools = []; + + // --- Selection logic --- + checkboxes.forEach(cb => { + cb.addEventListener("change", () => { + const toolName = cb.getAttribute("data-tool"); + if (cb.checked) { + if (!selectedTools.includes(toolName)) { + selectedTools.push(toolName); + } + } else { + selectedTools = selectedTools.filter(t => t !== toolName); + } + updateSelectedList(); + }); + }); + + function updateSelectedList() { + selectedList.innerHTML = ""; + if (selectedTools.length === 0) { + selectedList.textContent = "No tools selected"; + } else { + selectedTools.forEach(tool => { + const item = document.createElement("div"); + item.className = "flex items-center justify-between bg-indigo-100 text-indigo-800 px-3 py-1 rounded-md"; + item.innerHTML = `${tool}`; + item.querySelector(".remove-btn").addEventListener("click", () => { + selectedTools = selectedTools.filter(t => t !== tool); + document.querySelector(`.tool-checkbox[data-tool="${tool}"]`).checked = false; + updateSelectedList(); + }); + selectedList.appendChild(item); + }); + } + selectedCount.textContent = selectedTools.length; + } + + // --- Search logic --- + searchBox.addEventListener("input", () => { + const query = searchBox.value.trim().toLowerCase(); + toolRows.forEach(row => { + const name = row.dataset.name; + row.style.display = name.includes(query) ? "" : "none"; + }); + }); + + // --- Show inactive toggle --- + showInactive.addEventListener("change", () => { + const show = showInactive.checked; + toolRows.forEach(row => { + const status = row.dataset.status; + if (status === "Inactive") { + row.style.display = show ? "" : "none"; + } + }); + }); + // 👁 View modal + viewButtons.forEach(btn => { + btn.addEventListener("click", () => { + modalContent.innerHTML = ` +

Name: ${btn.dataset.name}

+

Type: ${btn.dataset.type}

+

Status: Inactive

+

Description: ${btn.dataset.desc}

+ `; + modal.classList.remove("hidden"); + }); + }); + + closeModal.addEventListener("click", () => modal.classList.add("hidden")); + + // Generic API call for Enrich/Validate + async function callToolOpsAPI(endpoint) { + // const selectedTools = getSelectedTools(); + console.log('global selected Tools...') + console.log(selectedTools) + const responseDiv = document.getElementById("toolOpsResponse"); + + if (selectedTools.length === 0) { + responseDiv.textContent = "⚠️ Please select at least one tool."; + return; + } + + responseDiv.textContent = `Running ${endpoint.replace("_", " ")} for ${selectedTools.length} tools...`; + + try { + const res = await fetch(`/${endpoint}`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ tools: selectedTools }), + }); + + if (!res.ok) throw new Error(`Server error: ${res.status}`); + const data = await res.json(); + if (endpoint === "tool_validation") { + console.log(JSON.stringify(data)); + openValidationModal(data.details); + } else { + responseDiv.textContent = data.message || "Enrich Tools completed successfully."; + } + + } catch (err) { + responseDiv.textContent = `❌ Error: ${err.message}`; + } + } + + // Modal Logic + function openValidationModal(results) { + const modal = document.getElementById("validationModal"); + const tableBody = document.getElementById("validationResultsTable"); + tableBody.innerHTML = ""; + + results.forEach(item => { + const row = document.createElement("tr"); + row.innerHTML = ` + ${item.tool} + ${item.status} + `; + tableBody.appendChild(row); + }); + + modal.classList.remove("hidden"); + modal.classList.add("flex"); + } + + document.getElementById("closeValidationModal").addEventListener("click", () => { + const modal = document.getElementById("validationModal"); + modal.classList.add("hidden"); + modal.classList.remove("flex"); + }); + + document.getElementById("crossValidationModal").addEventListener("click", () => { + const modal = document.getElementById("validationModal"); + modal.classList.add("hidden"); + modal.classList.remove("flex"); + }); + + // Button listeners + document.getElementById("enrichToolsBtn").addEventListener("click", () => callToolOpsAPI("enrich_tools")); + document.getElementById("validateToolsBtn").addEventListener("click", () => callToolOpsAPI("tool_validation")); + }); + + + + + // Add three fields to passthrough section on Advanced button click function handleAddPassthrough() { const passthroughContainer = safeGetElement("passthrough-container"); @@ -6254,6 +6413,7 @@ async function testTool(toolId) { } } } + async function runToolTest() { const form = safeGetElement("tool-test-form"); @@ -9726,6 +9886,7 @@ window.handleSubmitWithConfirmation = handleSubmitWithConfirmation; window.viewTool = viewTool; window.editTool = editTool; window.testTool = testTool; +window.validateTool = validateTool; window.viewResource = viewResource; window.editResource = editResource; window.viewPrompt = viewPrompt; diff --git a/mcpgateway/templates/admin.html b/mcpgateway/templates/admin.html index 4e3785831..79f4ab141 100644 --- a/mcpgateway/templates/admin.html +++ b/mcpgateway/templates/admin.html @@ -424,6 +424,15 @@ > 🛠️ Tools + + ⚙️ ToolOps + +
+
+
+

Tool Operations

+

+ Select tools and perform batch operations like enrichment and validation. +

+
+
+
+
+ +
+
+ +
+ + +
+
+ +
+ + + + + + + + + + + + {% for tool in tools %} + + + + + + + + {% endfor %} + +
NameTypeStatusAction
+ + {{ tool.name }}{{ tool.integrationType }} +
+ {% set enabled = tool.enabled %} + {% set reachable = tool.reachable %} + + {% if enabled and reachable %} + Online + {% elif enabled %} + Offline + {% else %} + Inactive + {% endif %} + + +
+
+
+ + + + + + + + +
+
+
+
+ + +
+
+
+

Selected Tools

+ 0 +
+
+ No tools selected +
+
+ +
+

Operations

+
+ +
+ + + +
+ + +
+
+
+
+
+
+
+ + + + + + + + + +
+ +
+ + + +
Date: Wed, 29 Oct 2025 10:40:16 +0530 Subject: [PATCH 012/108] fixed a minor bug related to tool test. --- mcpgateway/templates/admin.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mcpgateway/templates/admin.html b/mcpgateway/templates/admin.html index 79e5b07e2..f04faebea 100644 --- a/mcpgateway/templates/admin.html +++ b/mcpgateway/templates/admin.html @@ -2433,12 +2433,6 @@

Operations

- - - -
- -
- + +
+
+

+ Generate Test Cases +

+ + +
+ +
+ + + +
+ + +
+ + +
+ + +
+ + +
+
+
+
+ +