Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

MCP Server tools don't accept response from custom Now Assist skills

atharvsubhe
Tera Contributor

I am trying to setup an MCP Server to expose a Now Assist Skill which returns an LLM response. The skill is configured correctly, and it returns the response as follows: 

{
  "provider": "Now LLM",
  "response": {
    "model_output": "..."
  },
  "error": null,
  "errorCode": null,
  "status": "success"
}

Since MCP Server expects the tool to only return a single output and not a JSON object, it is not able to populate the tool's response. The MCP Server's tools response JSON is as follows: 

{
  "content": [
    {
      "type": "text",
      "text": "<final result>"
    }
  ],
  "isError": false
}


Is there a way to map the model output to the tool response's text field or just have the skill return the model output and none of the other fields? 

The current MCP Server tools only allow Now Assist Skills to be configured. Since each skill is always wrapped by an LLM response, the MCP Server will never receive the tool response correctly. How are these skills supposed to work as MCP Tools? Am I missing something? 

1 ACCEPTED SOLUTION

@atharvsubhe  Did you tried Putting Post Processing Script In Your Custom Now Assist Skill to Transform the data received from LLM . You Can transform the LLM Response to MCP Tools Format Consumable Data.

 

Hope This Helps.

 

Regards

RP

View solution in original post

5 REPLIES 5

rpriyadarshy
Tera Guru

  This is ServiceNow Native Quick MCP Server or Its Custom One?

 

As Per ServiceNow Not All OOTB or Custom Skills can be exposed as Tool Using ServiceNow MCP . if any Skill Custom or OOTB that  rely on internal information as inputs, such as sys_ids, Can not be exposed as Tool Using MCP Server.

 

Regards

RP

 

I have created a custom MCP Server using the MCP Server Console. As for the skills, I am only using 1 skill to perform KB retrieval from the knowledge table with the query being a tool input. 
The tool uses Now Assist Skill, with a retriever and generates a response answer based on the input query. It does not use any internal information. 

The tool seems to be working correctly, but the response from the tool is a LLM wrapped response.
Each skill including OOTB seem to return the following output fields provider, response, error, errorCode and status be default. 

Since the output is not a direct string, the MCP is not able to fetch it from the tool's output. From my understanding, if the skill outputs a single entity, the MCP should be able to interpret the output and populate its response field with the correct values. 
 
If each skill is using the same return format, I wonder how the other tools work since they also have the same structure and the MCP Server is still able to interpret. 

@atharvsubhe  Did you tried Putting Post Processing Script In Your Custom Now Assist Skill to Transform the data received from LLM . You Can transform the LLM Response to MCP Tools Format Consumable Data.

 

Hope This Helps.

 

Regards

RP

@atharvsubhe Good to See Issue is Solved.

 

Regards

RP