# Using type from packed tool

**URL:** <https://cwl.discourse.group/t/using-type-from-packed-tool/1045>\
**Category:** CWL Questions\
**Created:** [March 30, 2026, 10:29pm UTC](https://cwl.discourse.group/t/using-type-from-packed-tool/1045 "2026-03-30T22:29:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidjsherman](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/davidjsherman/32/205_2.png) [@davidjsherman](https://cwl.discourse.group/u/davidjsherman)\
**Post date:** [March 30, 2026, 10:29pm UTC](https://cwl.discourse.group/t/using-type-from-packed-tool/1045/1 "2026-03-30T22:29:55Z")

</div>

Our workflows use command line tools included raw from a static web site, using a namespace as in method (4) of [bio-cwl-tools](https://github.com/common-workflow-library/bio-cwl-tools). Some of our tools define types, which we include in the usual way with `SchemaDefRequirement`. This works when the tool and the type definition are in separate files.

But when we pack the tools and their associated types into a single portable file, we can’t find a way to refer to the type in the packed file. Cwltool constructs a reference with the complete URI inserted in front of the hash.

**Does anyone have a working example of using a type from a packed command line tool?**

Here is the kind of error `cwltool –validate` returns:

```http
checking field 'type'
  Field 'items' references unknown identifier
  'https://example.io/cwl-tools/tool/tool#types.yaml/input_type',
  tried
  file:///tmp/workflow/tools/gemenet-pw.cwl#https://example.io/cwl-tools/tool/tool#types.yaml/input_type

```

Here is how we normally refer to types defined in separate files:

```yaml
requirements:
  SchemaDefRequirement:
    types:
      - $import: cwl-tools:tool/types.yaml

inputs:
  something:
    type: cwl-tools:tool/types.yaml#input_type[]

steps:
  tool:
    run: cwl-tools:tool/tool.cwl
    in:
      something: something

$namespaces:
  cwl-tools: https://example.io/cwl-tools/

```

We think that the type reference using the packed tool should be

```yaml
inputs:
  something:
    type: cwl-tools:tool/tool.cwl#types.yaml/input_type[]

```

but in any case we don’t know how to include the type definition in `SchemaDefRequirement`

Thanks in advance for any advice or working examples
