Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 43 additions & 20 deletions spec/http/1.0/openapi.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"openapi": "3.1.0",
"info": {
"title": "Open Tool Calling Standard",
"title": "Open eXecution Protocol (OXP) Standard",
"version": "1.0.0",
"description": "A standard for calling tools (functions or services) in a distributed system.",
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
},
"contact": {
"url": "https://opentoolcalling.org"
"url": "https://openexecprotocol.org"
}
},
"paths": {
Expand Down Expand Up @@ -66,14 +66,14 @@
"type": "string",
"format": "uri"
},
"tools": {
"items": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed for expected consistency with a future pagination interface.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example of where this is useful? Does it help somehow with parameterizing types on the client side for static type purposes?

"type": "array",
"items": {
"$ref": "#/components/schemas/ToolDefinition"
}
}
},
"required": ["tools"]
"required": ["items"]
}
}
}
Expand Down Expand Up @@ -222,15 +222,8 @@
},
"input_schema": {
"type": "object",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more general than current function calling that LLMs do.

I think that restricting the input schema to be an object is reasonable?

The alternative is also allow positional arguments by that would still require restricting to either object or array or combination of array + object.

{
  "type": "object",
  "properties": {
    "input_schema": {
      "type": "object",
      "properties": {
        "type": {"const": "object"}
      },
      "required": ["type"]
    }
  },
  "required": ["input_schema"]
}

The object description is popular because it allows documenting the individual arguments and naming them.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK i suspect that this is actually a realization of an openapi.json instance rather than JSONSchema describing how to validate that a particular openapi.json instance implements the appropriate spec?

"properties": {
"parameters": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed parameters to flatten and make this consistent with output_schema.

"type": "object",
"additionalProperties": true,
"description": "JSON Schema describing the input parameters for the tool. Supports standard JSON Schema validation but excludes $ref and definitions/schemas for simplicity."
}
},
"required": ["parameters"],
"additionalProperties": true
"additionalProperties": true,
"description": "JSON Schema describing the input parameters for the tool. Supports standard JSON Schema validation but excludes $ref and definitions/schemas for simplicity."
},
"output_schema": {
"oneOf": [
Expand Down Expand Up @@ -298,13 +291,7 @@
"additionalProperties": true
}
},
"required": [
"id",
"name",
"description",
"input_schema",
"output_schema"
Comment on lines -305 to -306
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed input_ and output_ from required to reflect the fact that these MAY be null.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO these should be required.

  • The input should be explicitly an empty object to denote a parameterless function. You could argue in this case a bit if you really believe that positional arguments should be supported.
  • The output should be very explicit: Either it is known and can be specifically denoted as null or some other value, or it is not known and should be marked as any.

],
"required": ["id", "name", "description", "version"],
"additionalProperties": false
},
"CallToolRequest": {
Expand Down Expand Up @@ -430,6 +417,23 @@
"developer_message": {
"type": "string",
"description": "An internal message that will be logged but will not be shown to the user or the AI model"
},
"missing_requirements": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this to provide a structured way for the OXP server to let the client know that some requirements are missing.

"type": "object",
"description": "A map of missing requirements.",
"properties": {
"authorization": {
"type": "array",
"description": "A list of authorization challenges that must be completed before the tool can be called.",
"items": {
"$ref": "#/components/schemas/ToolAuthorizationChallenge"
}
},
"user_id": {
"type": "boolean",
"description": "Whether the tool requires a user ID."
}
}
}
},
"required": ["message"],
Expand All @@ -454,6 +458,25 @@
"required": ["message"],
"additionalProperties": true
},
"ToolAuthorizationChallenge": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for the authorization challenge."
},
"url": {
"type": "string",
"description": "The URL the user must visit to complete the authorization challenge."
},
"check_url": {
"type": "string",
"description": "The URL to check the status of the authorization challenge."
}
},
"required": ["id", "url"],
"additionalProperties": false
},
"ToolError": {
"type": "object",
"description": "An error that occurred inside the tool function.",
Expand Down