Apps SDK - it is showing the UI for a tool call, but not actually calling the tool

I’m seeing an issue where ChatGPT (via Apps SDK) will look like it’s calling a specific tool, but not actually call it. It’s reading the tool _meta to get the invoking / invoked text as well as the outputTemplate, but not anything else. This is also a read only tool and it doesn’t ask for my permission to call it at all.

I’m seeing zero logs / traces in my backend for these calls.

Let me know if there’s other info I can provide to help debug.

Thanks!

1 Like

Read-only tools will not request permission to be invoked, and will also not be able to utilize your input parameters in case you need those. I would try removing the readonly attribute and see if you can achieve the desired output. I have had issues while using it in the past, the documentation is not really clear on its impact.

This one doesn’t have a read only attribute. It was working as desired yesterday morning. It would first confirm the tool call, then execute it, and the execution would call the tool code itself. Seems like something changed yesterday evening due to a release.

This is what I’ve set for my _meta, and no attributes at all

"openai/toolInvocation/invoking": "Generating data",
"openai/toolInvocation/invoked": "Queued data generation job",
"openai/outputTemplate": DatagenWidget.uri,
1 Like

I can confirm there is something unusual going on. It is not asking for permissions to run some tools, some other works just fine, but some just freeze exactly as you reported. I am also sure this was working earlier this week. I’m trying to find some consistency here, let me know if you have any luck making it work again

1 Like

Just realized in my original message I said it was a read only tool when what I mean is that it’s a write tool (not read only.) Sorry for the confusion there.

Still no luck, it keeps hanging. I wrote up a support ticket as well for this.

1 Like

I am also experiencing the same thing! For the last 24 hours I thought there was something in my code that was critically wrong. Keep us posted on what you’re seeing.

2 Likes

The good news is: it’s not happening anymore. The bad new is: it’s because MCP connectors aren’t working at all.

relevant: Apps SDK - All my Apps /connectors disappeared

2 Likes

Moved my reply to: Apps SDK - All my Apps /connectors disappeared - #36 by jiayaoyu

The connectors are back, but still having an issue with these write calls.

1 Like

Still running into issues with Write Calls as well. It calls tool, details look accurate, but doesn’t connect to mcp connection or make data changes. All read functions are working, but write functions are uniquely broke.

1 Like

Ok so I created two simple tools to add and multiply a couple of numbers, without any widgets, starting from scratch to see if I was doing something wrong. But it seems it only works when the function is read-only; write functions sometimes work randomly, but most times it doesn’t, those are the two functions code:

server.registerTool(
  'add',
  {
    title: 'Addition Tool',
    description: 'Use this function to add/sum or subtract two numbers',
    inputSchema: { a: z.number(), b: z.number() },
    outputSchema: { result: z.number() },
    _meta: {
      "openai/toolInvocation/invoking": "Displaying result",
      "openai/toolInvocation/invoked": "Displayed result"
    },
    annotations: {
      readOnlyHint: false
    }
  },
  async ({ a, b }) => {
    const output = { result: a + b };
    return {
      content: [{ type: 'text', text: JSON.stringify(output) }],
      structuredContent: output
    };
  }
);

server.registerTool(
  'multiply',
  {
    title: 'Multiply Tool',
    description: 'Use this function to multiply two numbers',
    inputSchema: { a: z.number(), b: z.number() },
    outputSchema: { result: z.number() },
    _meta: {
      "openai/toolInvocation/invoking": "Displaying result",
      "openai/toolInvocation/invoked": "Displayed result"
    },
    annotations: {
      readOnlyHint: false
    }
  },
  async ({ a, b }) => {
    const output = { result: a * b };
    return {
      content: [{ type: 'text', text: "Multiplied!" }],
      structuredContent: output
    };
  }
);

When readOnlyHint is true, results display:

When readOnlyHint is false, stuck in “Called tool”:

Am I missing something silly here, or is it really broken?

On a side note, _meta for openai/toolInvocation/invoked and openai/toolInvocation/invoking seems not to be working as well, as you can see in the screenshots

@rajtuki569 I have tested 2 or 3 fresh new MCP servers with different URLs (I’m using ngrok btw), no success unfortunately.